tarIsCompressed.php
Table of Contents
Functions
- tarIsCompressed() : bool
- Checks if a given tar file is compressed.
Functions
tarIsCompressed()
Checks if a given tar file is compressed.
tarIsCompressed(string $tarFile) : bool
This function determines whether the file name indicates a compressed tar archive
based on common compressed tar extensions such as .tar.gz
, .tgz
, .tar.bz2
, or .tbz2
.
Note: This function only inspects the file name extension, not the actual file contents.
Parameters
- $tarFile : string
-
The path or filename of the tar archive.
Tags
Return values
bool —True if the file is recognized as a compressed tar archive, false otherwise.