A Path handling class
- Depuis
- 1.0
◆ canChmod()
Checks if a path's permissions can be changed.
- Paramètres
-
string | $path | Path to check. |
- Renvoie
- boolean True if path can have mode changed.
- Depuis
- 1.0
Références $path.
Référencé par File\delete().
◆ check()
static check |
( |
|
$path, |
|
|
|
$basePath = '' |
|
) |
| |
|
static |
Checks for snooping outside of the file system root.
- Paramètres
-
string | $path | A file system path to check. |
string | $basePath | The base path of the system |
- Renvoie
- string A cleaned version of the path or exit on error.
- Depuis
- 1.0
- Exceptions
-
Références $basePath, et $path.
Référencé par Checkfiles\checkImages().
◆ clean()
static clean |
( |
|
$path, |
|
|
|
$ds = \DIRECTORY_SEPARATOR |
|
) |
| |
|
static |
Function to strip additional / or \ in a path name.
- Paramètres
-
string | $path | The path to clean. |
string | $ds | Directory separator (optional). |
- Renvoie
- string The cleaned path.
- Depuis
- 1.0
- Exceptions
-
Références $path, et Laminas\Diactoros\$stream.
Référencé par Folder\_items(), Folder\copy(), File\copy(), Folder\create(), File\delete(), Folder\delete(), Tar\extract(), Zip\extractCustom(), Folder\files(), Folder\folders(), Tar\isBelow(), Zip\isBelow(), Folder\listFolderTree(), Requests\makeGetRequest(), File\move(), Folder\move(), File\upload(), et File\write().
◆ find()
static find |
( |
|
$paths, |
|
|
|
$file |
|
) |
| |
|
static |
Searches the directory paths for a given file.
- Paramètres
-
mixed | $paths | A path string or array of path strings to search in |
string | $file | The file name to look for. |
- Renvoie
- string|boolean The full path and file name for the target file, or boolean false if the file is not found in any of the paths.
- Depuis
- 1.0
Références $path.
◆ getPermissions()
static getPermissions |
( |
|
$path | ) |
|
|
static |
Get the permissions of the file/folder at a give path.
- Paramètres
-
string | $path | The path of a file/folder. |
- Renvoie
- string Filesystem permissions.
- Depuis
- 1.0
Références $i, $mode, et $path.
◆ isOwner()
◆ removeRoot()
static removeRoot |
( |
|
$message, |
|
|
|
$rootDirectory = null |
|
) |
| |
|
static |
◆ resolve()
Resolves /./, /../ and multiple / in a string and returns the resulting absolute path, inspired by Flysystem Removes trailing slashes
- Paramètres
-
string | $path | A path to resolve |
- Renvoie
- string The resolved path
- Depuis
- 1.6.0
Références $parts, et $path.
Référencé par Tar\isBelow(), et Zip\isBelow().
◆ setPermissions()
static setPermissions |
( |
|
$path, |
|
|
|
$filemode = '0644' , |
|
|
|
$foldermode = '0755' |
|
) |
| |
|
static |
Chmods files and directories recursively to given permissions.
- Paramètres
-
string | $path | Root path to begin changing mode [without trailing slash]. |
string | $filemode | Octal representation of the value to change file mode to [null = no change]. |
string | $foldermode | Octal representation of the value to change folder mode to [null = no change]. |
- Renvoie
- boolean True if successful [one fail means the whole operation failed].
- Depuis
- 1.0
Références $path.
Référencé par File\upload(), et SiteStatus\writeConfigFile().
La documentation de cette classe a été générée à partir du fichier suivant :