October\Rain\Filesystem\Zip
Overview
Zip helper
Extends
- ZipArchive
Implements
- Countable
Public Properties
There are no public properties in the class.
Show inherited public properties
Inherited Public Properties
- $lastId - (defined in ZipArchive)
- $status - (defined in ZipArchive)
- $statusSys - (defined in ZipArchive)
- $numFiles - (defined in ZipArchive)
- $filename - (defined in ZipArchive)
- $comment - (defined in ZipArchive)
Protected Properties
protected string $folderPrefix
protected array $excludedFiles
protected array $excludedFolders
Public Methods
public add()
public add(mixed $source, array $options = []): self
add includes a source to the Zip
public exclude()
public exclude($paths): void
exclude paths from inclusion in the zip file
public static extract()
public static extract(
string $source,
string $destination,
array $options = []
): bool
extract an existing zip file.
public folder()
public folder(string $name, mixed $source = null): self
folder creates a new folder inside the Zip and adds source files (optional)
public isExcluded()
public isExcluded($path): bool
isExcluded checks if a path is excluded
public static make()
public static make(
string $destination,
mixed $source,
array $options = []
): self
make creates a new empty zip file.
public remove()
public remove(string $source): self
remove a file or folder from the zip collection. Does not support wildcards.
Inherited Public Methods
- addEmptyDir() - (defined in ZipArchive)
- addFile() - (defined in ZipArchive)
- addFromString() - (defined in ZipArchive)
- addGlob() - (defined in ZipArchive)
- addPattern() - (defined in ZipArchive)
- clearError() - (defined in ZipArchive)
- close() - (defined in ZipArchive)
- count() - (defined in ZipArchive)
- deleteIndex() - (defined in ZipArchive)
- deleteName() - (defined in ZipArchive)
- extractTo() - (defined in ZipArchive)
- getArchiveComment() - (defined in ZipArchive)
- getArchiveFlag() - (defined in ZipArchive)
- getCommentIndex() - (defined in ZipArchive)
- getCommentName() - (defined in ZipArchive)
- getExternalAttributesIndex() - (defined in ZipArchive)
- getExternalAttributesName() - (defined in ZipArchive)
- getFromIndex() - (defined in ZipArchive)
- getFromName() - (defined in ZipArchive)
- getNameIndex() - (defined in ZipArchive)
- getStatusString() - (defined in ZipArchive)
- getStream() - (defined in ZipArchive)
- getStreamIndex() - (defined in ZipArchive)
- getStreamName() - (defined in ZipArchive)
- isCompressionMethodSupported() - (defined in ZipArchive)
- isEncryptionMethodSupported() - (defined in ZipArchive)
- locateName() - (defined in ZipArchive)
- open() - (defined in ZipArchive)
- registerCancelCallback() - (defined in ZipArchive)
- registerProgressCallback() - (defined in ZipArchive)
- renameIndex() - (defined in ZipArchive)
- renameName() - (defined in ZipArchive)
- replaceFile() - (defined in ZipArchive)
- setArchiveComment() - (defined in ZipArchive)
- setArchiveFlag() - (defined in ZipArchive)
- setCommentIndex() - (defined in ZipArchive)
- setCommentName() - (defined in ZipArchive)
- setCompressionIndex() - (defined in ZipArchive)
- setCompressionName() - (defined in ZipArchive)
- setEncryptionIndex() - (defined in ZipArchive)
- setEncryptionName() - (defined in ZipArchive)
- setExternalAttributesIndex() - (defined in ZipArchive)
- setExternalAttributesName() - (defined in ZipArchive)
- setMtimeIndex() - (defined in ZipArchive)
- setMtimeName() - (defined in ZipArchive)
- setPassword() - (defined in ZipArchive)
- statIndex() - (defined in ZipArchive)
- statName() - (defined in ZipArchive)
- unchangeAll() - (defined in ZipArchive)
- unchangeArchive() - (defined in ZipArchive)
- unchangeIndex() - (defined in ZipArchive)
- unchangeName() - (defined in ZipArchive)
Protected Methods
protected removePathPrefix()
protected removePathPrefix(string $prefix, string $path): string
removePathPrefix removes a prefix from a path.