Oihana PHP

TarOption uses ConstantsTrait

FileExtension

Enumeration class that defines various mode options to use in the findFiles function.

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Constants

DRY_RUN  : string = 'dryRun'
Return the files in the archive.
EXCLUDE  : string = 'exclude'
List of glob patterns or file names to exclude.
FILTER  : string = 'filter'
Filter the files or directories to archive with a function (string $filepath): bool
KEEP_PERMISSIONS  : string = 'keepPermissions'
Keep the permissions of the files/directories.
MAX_EXTRACTED_SIZE  : string = 'maxExtractedSize'
Maximum total uncompressed size in bytes accepted during extraction.
METADATA  : string = 'metadata'
Additional metadata to include in `.metadata.json`
OVERWRITE  : string = 'overwrite'
Overwrite the archive.

Constants

DRY_RUN

Return the files in the archive.

public string DRY_RUN = 'dryRun'

EXCLUDE

List of glob patterns or file names to exclude.

public string EXCLUDE = 'exclude'

FILTER

Filter the files or directories to archive with a function (string $filepath): bool

public string FILTER = 'filter'

KEEP_PERMISSIONS

Keep the permissions of the files/directories.

public string KEEP_PERMISSIONS = 'keepPermissions'

MAX_EXTRACTED_SIZE

Maximum total uncompressed size in bytes accepted during extraction.

public string MAX_EXTRACTED_SIZE = 'maxExtractedSize'

When set to a positive integer, untar() runs a pre-scan of the archive and throws RuntimeException if the sum of the entries' uncompressed sizes exceeds this limit, before any file is written to disk. This guards against decompression-bomb attacks (small archive expanding to gigabytes).

Default: null — no limit (backward compatible).

METADATA

Additional metadata to include in `.metadata.json`

public string METADATA = 'metadata'

OVERWRITE

Overwrite the archive.

public string OVERWRITE = 'overwrite'
On this page

Search results