object zip
- Alphabetic
- By Inheritance
- zip
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(dest: Path, sources: Seq[ZipSource] = List(), excludePatterns: Seq[Regex] = List(), includePatterns: Seq[Regex] = List(), preserveMtimes: Boolean = false, deletePatterns: Seq[Regex] = List(), compressionLevel: Int = java.util.zip.Deflater.DEFAULT_COMPRESSION, followLinks: Boolean = true): Path
Zips the provided list of files and directories into a single ZIP archive.
Zips the provided list of files and directories into a single ZIP archive.
Unix file permissions will be preserved when creating a new zip, i.e. when
destdoes not already exists.If
destalready exists and is a zip, performs modifications todestin place rather than creating a new zip. In that case, - Unix file permissions will be preserved if Java Runtime Version >= 14 - if using Java Runtime Version < 14, Unix file permissions are not preserved, even for existing zip entries - symbolics links will always be stored as the referenced files - existing symbolic links stored in the zip might lose their symbolic link file type field and become broken- dest
The path to the destination ZIP file.
- sources
A list of paths to files and directories to be zipped. Defaults to an empty list.
- excludePatterns
A list of regular expression patterns to exclude files from the ZIP archive. Defaults to an empty list.
- includePatterns
A list of regular expression patterns to include files in the ZIP archive. Defaults to an empty list (includes all files).
- preserveMtimes
Whether to preserve modification times (mtimes) of the files.
- deletePatterns
A list of regular expression patterns to delete files from an existing ZIP archive before appending new ones.
- compressionLevel
number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression).
- followLinks
Whether to store symbolic links as the referenced files. Default to
true. Setting this tofalsehas no effect when modifying a zip file in place.- returns
The path to the created ZIP archive.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def open(path: Path): ZipRoot
Opens a zip file as a filesystem root that you can operate on using
os.*APIs.Opens a zip file as a filesystem root that you can operate on using
os.*APIs. Note that you need to callclose()on the returnedZipRootwhen you are done with it, to avoid leaking filesystem resources - def stream(sources: Seq[ZipSource], excludePatterns: Seq[Regex] = List(), includePatterns: Seq[Regex] = List(), preserveMtimes: Boolean = false, compressionLevel: Int = java.util.zip.Deflater.DEFAULT_COMPRESSION, followLinks: Boolean = false): Writable
Zips a folder recursively and returns a geny.Writable for streaming the ZIP data.
Zips a folder recursively and returns a geny.Writable for streaming the ZIP data.
- excludePatterns
A list of regular expression patterns to exclude files during zipping. Defaults to an empty list.
- includePatterns
A list of regular expression patterns to include files in the ZIP archive. Defaults to an empty list (includes all files).
- preserveMtimes
Whether to preserve modification times (mtimes) of the files.
- compressionLevel
number from 0-9, where 0 is no compression and 9 is best compression. Defaults to -1 (default compression).
- followLinks
Whether to store symbolic links as the referenced files. Default to true.
- returns
A geny.Writable object for writing the ZIP data.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object ZipSource
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)