ResourceExistenceChecker
trait ResourceExistenceChecker (View source)
Methods
bool
checkResources(string|string[] $resources, string $type = 'fileAndDir')
Checks if the given input is a file or folder.
bool
checkResource(string $resource, string $type)
Checks a single resource, file or directory.
checkSourceAndTargetResource(string|array $resources)
Convenience method to check the often uses "source => target" file / folder arrays.
bool
isDir(string $directory)
Wrapper method around phps is_dir()
bool
isFile(string $file)
Wrapper method around phps file_exists()
Details
protected bool
checkResources(string|string[] $resources, string $type = 'fileAndDir')
Checks if the given input is a file or folder.
protected bool
checkResource(string $resource, string $type)
Checks a single resource, file or directory.
It will print an error as well on the console.
protected
checkSourceAndTargetResource(string|array $resources)
Convenience method to check the often uses "source => target" file / folder arrays.
protected bool
isDir(string $directory)
Wrapper method around phps is_dir()
protected bool
isFile(string $file)
Wrapper method around phps file_exists()