Skip to content

Commit 0822593

Browse files
committed
Add doc
1 parent e8a38e2 commit 0822593

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

os/src/ZipOps.scala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,20 @@ object zip {
3434
* If `dest` already exists and is a zip, performs modifications to `dest` in place
3535
* rather than creating a new zip.
3636
*
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+
*
3743
* @param dest The path to the destination ZIP file.
3844
* @param sources A list of paths to files and directories to be zipped. Defaults to an empty list.
3945
* @param excludePatterns A list of regular expression patterns to exclude files from the ZIP archive. Defaults to an empty list.
4046
* @param includePatterns A list of regular expression patterns to include files in the ZIP archive. Defaults to an empty list (includes all files).
4147
* @param preserveMtimes Whether to preserve modification times (mtimes) of the files.
4248
* @param deletePatterns A list of regular expression patterns to delete files from an existing ZIP archive before appending new ones.
43-
* @param compressionLevel number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression)
49+
* @param compressionLevel number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression).
50+
* @param perserveLinks 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.
4451
* @return The path to the created ZIP archive.
4552
*/
4653
def apply(
@@ -225,6 +232,8 @@ object zip {
225232
* @param excludePatterns A list of regular expression patterns to exclude files during zipping. Defaults to an empty list.
226233
* @param includePatterns A list of regular expression patterns to include files in the ZIP archive. Defaults to an empty list (includes all files).
227234
* @param preserveMtimes Whether to preserve modification times (mtimes) of the files.
235+
* @param compressionLevel number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression).
236+
* @param perserveLinks 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.
228237
* @return A geny.Writable object for writing the ZIP data.
229238
*/
230239
def stream(

0 commit comments

Comments
 (0)