Cloud
interface Cloud implements Filesystem
Methods
Get the full path to the file that exists at the given relative path.
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.
Set the visibility for the given path.
Prepend to a file.
Append to a file.
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.
Get the URL for the file at the given path.
Details
in
Filesystem at line 27
string
path(string $path)
Get the full path to the file that exists at the given relative path.
in
Filesystem at line 32
bool
exists(string $path)
Determine if a file exists.
in
Filesystem at line 37
string|null
get(string $path)
Get the contents of a file.
in
Filesystem at line 44
mixed
readStream(string $path)
Get a resource to read the file.
in
Filesystem at line 52
mixed
readStreamRange(string $path, int|null $start, int|null $end)
Get a resource to read the partial file.
in
Filesystem at line 59
bool|string
put(string $path, mixed $contents, mixed $options = [])
Write the contents of a file.
in
Filesystem at line 64
false|string
putFile(string|File|UploadedFile $path, array|string|File|UploadedFile|null $file = null, mixed $options = [])
Store the uploaded file on the disk.
in
Filesystem at line 69
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.
in
Filesystem at line 76
bool
writeStream(string $path, mixed $resource, array $options = [])
Write a new file using a stream.
in
Filesystem at line 81
string
getVisibility(string $path)
Get the visibility for the given path.
in
Filesystem at line 86
bool
setVisibility(string $path, string $visibility)
Set the visibility for the given path.
in
Filesystem at line 91
bool
prepend(string $path, string $data, string $separator = PHP_EOL)
Prepend to a file.
in
Filesystem at line 96
bool
append(string $path, string $data, string $separator = PHP_EOL)
Append to a file.
in
Filesystem at line 101
bool
delete(array|string $paths)
Delete the file at a given path.
in
Filesystem at line 106
bool
copy(string $from, string $to)
Copy a file to a new location.
in
Filesystem at line 111
bool
move(string $from, string $to)
Move a file to a new location.
in
Filesystem at line 116
int
size(string $path)
Get the file size of a given file.
in
Filesystem at line 121
int
lastModified(string $path)
Get the file's last modification time.
in
Filesystem at line 128
array
files(string|null $directory = null, bool $recursive = false)
Get an array of all files in a directory.
in
Filesystem at line 135
array
allFiles(string|null $directory = null)
Get all of the files from the given directory (recursive).
in
Filesystem at line 142
array
directories(string|null $directory = null, bool $recursive = false)
Get all of the directories within a given directory.
in
Filesystem at line 149
array
allDirectories(string|null $directory = null)
Get all (recursive) of the directories within a given directory.
in
Filesystem at line 154
bool
makeDirectory(string $path)
Create a directory.
in
Filesystem at line 159
bool
deleteDirectory(string $directory)
Recursively delete a directory.
at line 12
string
url(string $path)
Get the URL for the file at the given path.