class PathWrapper

Wrapper class for Path

Methods

boolean
canChmod( string $path)

Helper wrapper method for canChmod

boolean
setPermissions( string $path, string $filemode = '0644', string $foldermode = '0755')

Helper wrapper method for setPermissions

string
getPermissions( string $path)

Helper wrapper method for getPermissions

string
check( string $path)

Helper wrapper method for check

string
clean( string $path, string $ds = DIRECTORY_SEPARATOR)

Helper wrapper method for clean

boolean
isOwner( string $path)

Helper wrapper method for isOwner

mixed
find( mixed $paths, string $file)

Helper wrapper method for find

Details

boolean canChmod( string $path)

Helper wrapper method for canChmod

Parameters

string $path Path to check.

Return Value

boolean True if path can have mode changed.

See also

Path::canChmod()

boolean setPermissions( string $path, string $filemode = '0644', string $foldermode = '0755')

Helper wrapper method for setPermissions

Parameters

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].

Return Value

boolean True if successful [one fail means the whole operation failed].

See also

Path::setPermissions()

string getPermissions( string $path)

Helper wrapper method for getPermissions

Parameters

string $path The path of a file/folder.

Return Value

string Filesystem permissions.

See also

Path::getPermissions()

string check( string $path)

Helper wrapper method for check

Parameters

string $path A file system path to check.

Return Value

string A cleaned version of the path or exit on error.

Exceptions

Exception

See also

Path::check()

string clean( string $path, string $ds = DIRECTORY_SEPARATOR)

Helper wrapper method for clean

Parameters

string $path The path to clean.
string $ds Directory separator (optional).

Return Value

string The cleaned path.

Exceptions

UnexpectedValueException

See also

Path::clean()

boolean isOwner( string $path)

Helper wrapper method for isOwner

Parameters

string $path Path to check ownership.

Return Value

boolean True if the php script owns the path passed.

See also

Path::isOwner()

mixed find( mixed $paths, string $file)

Helper wrapper method for find

Parameters

mixed $paths A path string or array of path strings to search in
string $file The file name to look for.

Return Value

mixed The full path and file name for the target file, or boolean false if the file is not found in any of the paths.

See also

Path::find()