Filesystem
interface Filesystem
Constants
| VISIBILITY_PUBLIC |
The public visibility setting. |
| VISIBILITY_PRIVATE |
The private visibility setting. |
Methods
Get the full path to the file that exists at the given relative path.
Determine if a file exists.
Get the contents of a file.
Get a resource to read the file.
Get a resource to read the partial file.
Write the contents of a file.
Store the uploaded file on the disk.
Store the uploaded file on the disk with a given name.
Write a new file using a stream.
Get the visibility for the given path.
Set the visibility for the given path.
Prepend to a file.
Append to a file.
Delete the file at a given path.
Copy a file to a new location.
Move a file to a new location.
Get the file size of a given file.
Get the file's last modification time.
Get an array of all files in a directory.
Get all of the files from the given directory (recursive).
Get all of the directories within a given directory.
Get all (recursive) of the directories within a given directory.
Create a directory.
Recursively delete a directory.
Details
at line 31
string
path(string $path)
Get the full path to the file that exists at the given relative path.
at line 36
bool
exists(string $path)
Determine if a file exists.
at line 41
string|null
get(string $path)
Get the contents of a file.
at line 48
mixed
readStream(string $path)
Get a resource to read the file.
at line 56
mixed
readStreamRange(string $path, int|null $start, int|null $end)
Get a resource to read the partial file.
at line 63
bool|string
put(string $path, mixed $contents, mixed $options = [])
Write the contents of a file.
at line 68
false|string
putFile(string|File|UploadedFile $path, array|string|File|UploadedFile|null $file = null, mixed $options = [])
Store the uploaded file on the disk.
at line 73
false|string
putFileAs(string|File|UploadedFile $path, array|string|File|UploadedFile|null $file, array|string|null $name = null, mixed $options = [])
Store the uploaded file on the disk with a given name.
at line 80
bool
writeStream(string $path, mixed $resource, array $options = [])
Write a new file using a stream.
at line 85
string
getVisibility(string $path)
Get the visibility for the given path.
at line 90
bool
setVisibility(string $path, string $visibility)
Set the visibility for the given path.
at line 95
bool
prepend(string $path, string $data)
Prepend to a file.
at line 100
bool
append(string $path, string $data)
Append to a file.
at line 105
bool
delete(array|string $paths)
Delete the file at a given path.
at line 110
bool
copy(string $from, string $to)
Copy a file to a new location.
at line 115
bool
move(string $from, string $to)
Move a file to a new location.
at line 120
int
size(string $path)
Get the file size of a given file.
at line 125
int
lastModified(string $path)
Get the file's last modification time.
at line 130
array
files(string|null $directory = null, bool $recursive = false)
Get an array of all files in a directory.
at line 135
array
allFiles(string|null $directory = null)
Get all of the files from the given directory (recursive).
at line 140
array
directories(string|null $directory = null, bool $recursive = false)
Get all of the directories within a given directory.
at line 145
array
allDirectories(string|null $directory = null)
Get all (recursive) of the directories within a given directory.
at line 150
bool
makeDirectory(string $path)
Create a directory.
at line 155
bool
deleteDirectory(string $directory)
Recursively delete a directory.