Path
class Path (View source)
A Path handling class
Methods
Checks if a path's permissions can be changed.
Chmods files and directories recursively to given permissions.
Get the permissions of the file/folder at a give path.
Checks for snooping outside of the file system root.
Function to strip additional / or \ in a path name.
Normalize a path. This method will do clean() first to replace slashes and remove '.
Searches the directory paths for a given file.
Details
at line line 29
static boolean
canChmod(string $path)
Checks if a path's permissions can be changed.
at line line 57
static boolean
setPermissions(string $path, string $filemode = '0644', string $foldermode = '0755')
Chmods files and directories recursively to given permissions.
at line line 123
static string
getPermissions(string $path, boolean $toString = false)
Get the permissions of the file/folder at a give path.
at line line 166
static string
check(string $path, string $root)
Checks for snooping outside of the file system root.
at line line 194
static string
clean(string $path, string $ds = DIRECTORY_SEPARATOR)
Function to strip additional / or \ in a path name.
at line line 229
static string
normalize(string $path, string $ds = DIRECTORY_SEPARATOR)
Normalize a path. This method will do clean() first to replace slashes and remove '.
.' to create a Clean path. Unlike realpath(), if this path not exists, normalise() will still return this path.
at line line 278
static mixed
find(mixed $paths, string $file)
Searches the directory paths for a given file.