You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: os/src/ZipOps.scala
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,20 @@ object zip {
34
34
* If `dest` already exists and is a zip, performs modifications to `dest` in place
35
35
* rather than creating a new zip.
36
36
*
37
+
* When adding new files to an existing zip,
38
+
* - UNIX file permissions will be preserved if Java Runtime Version >= 14
39
+
* - if using Java Runtime Version < 14, UNIX file permissions are not preserved, even for existing zip entries
40
+
* - symbolics links will always be stored as the referenced files
41
+
* - existing symbolic links stored the zip might lose their symbolic link file type field
42
+
*
37
43
* @paramdest The path to the destination ZIP file.
38
44
* @paramsources A list of paths to files and directories to be zipped. Defaults to an empty list.
39
45
* @paramexcludePatterns A list of regular expression patterns to exclude files from the ZIP archive. Defaults to an empty list.
40
46
* @paramincludePatterns A list of regular expression patterns to include files in the ZIP archive. Defaults to an empty list (includes all files).
41
47
* @parampreserveMtimes Whether to preserve modification times (mtimes) of the files.
42
48
* @paramdeletePatterns A list of regular expression patterns to delete files from an existing ZIP archive before appending new ones.
43
-
* @paramcompressionLevel number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression)
49
+
* @paramcompressionLevel number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression).
50
+
* @paramperserveLinks Whether to store symbolic links as symbolic links instead of the referenced files. Default to false. Setting this to true has no effect when modifying a zip file in place.
44
51
* @return The path to the created ZIP archive.
45
52
*/
46
53
defapply(
@@ -225,6 +232,8 @@ object zip {
225
232
* @paramexcludePatterns A list of regular expression patterns to exclude files during zipping. Defaults to an empty list.
226
233
* @paramincludePatterns A list of regular expression patterns to include files in the ZIP archive. Defaults to an empty list (includes all files).
227
234
* @parampreserveMtimes Whether to preserve modification times (mtimes) of the files.
235
+
* @paramcompressionLevel number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression).
236
+
* @paramperserveLinks Whether to store symbolic links as symbolic links instead of the referenced files. Default to false. Setting this to true has no effect when modifying a zip file in place.
228
237
* @return A geny.Writable object for writing the ZIP data.
0 commit comments