Filesystem
Constants
VISIBILITY_PUBLIC string
The public visibility setting.
VISIBILITY_PRIVATE string
The private visibility setting.
Methods
exists ( $path ) : bool
Determine if a file exists.
Parameters
- $path string
get ( $path ) : string
Get the contents of a file.
Parameters
- $path string
readStream ( $path ) : resource|null
Get a resource to read the file.
Parameters
- $path string
put ( $path , $contents , $options ) : bool
Write the contents of a file.
Parameters
- $path string
- $contents string|resource
- $options mixed
writeStream ( $path , $resource , array $options ) : bool
Write a new file using a stream.
Parameters
- $path string
- $resource resource
- $options array
getVisibility ( $path ) : string
Get the visibility for the given path.
Parameters
- $path string
setVisibility ( $path , $visibility ) : bool
Set the visibility for the given path.
Parameters
- $path string
- $visibility string
prepend ( $path , $data ) : bool
Prepend to a file.
Parameters
- $path string
- $data string
append ( $path , $data ) : bool
Append to a file.
Parameters
- $path string
- $data string
delete ( $paths ) : bool
Delete the file at a given path.
Parameters
- $paths string|array
copy ( $from , $to ) : bool
Copy a file to a new location.
Parameters
- $from string
- $to string
move ( $from , $to ) : bool
Move a file to a new location.
Parameters
- $from string
- $to string
size ( $path ) : int
Get the file size of a given file.
Parameters
- $path string
lastModified ( $path ) : int
Get the file's last modification time.
Parameters
- $path string
files ( $directory , $recursive ) : array
Get an array of all files in a directory.
Parameters
- $directory string|null
- $recursive bool
allFiles ( $directory ) : array
Get all of the files from the given directory (recursive).
Parameters
- $directory string|null
directories ( $directory , $recursive ) : array
Get all of the directories within a given directory.
Parameters
- $directory string|null
- $recursive bool
allDirectories ( $directory ) : array
Get all (recursive) of the directories within a given directory.
Parameters
- $directory string|null
makeDirectory ( $path ) : bool
Create a directory.
Parameters
- $path string
deleteDirectory ( $directory ) : bool
Recursively delete a directory.
Parameters
- $directory string