assertTar.php
Table of Contents
Functions
- assertTar() : bool
- Validates that a file is a tar archive (compressed or uncompressed).
Functions
assertTar()
Validates that a file is a tar archive (compressed or uncompressed).
assertTar(string $filePath[, bool $strictMode = false ]) : bool
Parameters
- $filePath : string
-
Path to the file to validate.
- $strictMode : bool = false
-
If true, performs deep validation using file contents. If false, only checks extension and basic MIME type.
Tags
Return values
bool —True if the file is a valid tar archive, false otherwise.