Cloud
interface Cloud implements Filesystem (View source)
Methods
bool | exists(string $path) Determine if a file exists. | from Filesystem |
string | get(string $path) Get the contents of a file. | from Filesystem |
resource|null | readStream(string $path) Get a resource to read the file. | from Filesystem |
bool | put(string $path, string|resource $contents, mixed $options = []) Write the contents of a file. | from Filesystem |
bool | writeStream(string $path, resource $resource, array $options = []) Write a new file using a stream. | from Filesystem |
string | getVisibility(string $path) Get the visibility for the given path. | from Filesystem |
bool | setVisibility(string $path, string $visibility) Set the visibility for the given path. | from Filesystem |
bool | prepend(string $path, string $data) Prepend to a file. | from Filesystem |
bool | append(string $path, string $data) Append to a file. | from Filesystem |
bool | delete(string|array $paths) Delete the file at a given path. | from Filesystem |
bool | copy(string $from, string $to) Copy a file to a new location. | from Filesystem |
bool | move(string $from, string $to) Move a file to a new location. | from Filesystem |
int | size(string $path) Get the file size of a given file. | from Filesystem |
int | lastModified(string $path) Get the file's last modification time. | from Filesystem |
array | files(string|null $directory = null, bool $recursive = false) Get an array of all files in a directory. | from Filesystem |
array | allFiles(string|null $directory = null) Get all of the files from the given directory (recursive). | from Filesystem |
array | directories(string|null $directory = null, bool $recursive = false) Get all of the directories within a given directory. | from Filesystem |
array | allDirectories(string|null $directory = null) Get all (recursive) of the directories within a given directory. | from Filesystem |
bool | makeDirectory(string $path) Create a directory. | from Filesystem |
bool | deleteDirectory(string $directory) Recursively delete a directory. | from Filesystem |
string | url(string $path) Get the URL for the file at the given path. |
Details
bool exists(string $path)
Determine if a file exists.
string get(string $path)
Get the contents of a file.
resource|null readStream(string $path)
Get a resource to read the file.
bool put(string $path, string|resource $contents, mixed $options = [])
Write the contents of a file.
bool writeStream(string $path, resource $resource, array $options = [])
Write a new file using a stream.
string getVisibility(string $path)
Get the visibility for the given path.
bool setVisibility(string $path, string $visibility)
Set the visibility for the given path.
bool prepend(string $path, string $data)
Prepend to a file.
bool append(string $path, string $data)
Append to a file.
bool delete(string|array $paths)
Delete the file at a given path.
bool copy(string $from, string $to)
Copy a file to a new location.
bool move(string $from, string $to)
Move a file to a new location.
int size(string $path)
Get the file size of a given file.
int lastModified(string $path)
Get the file's last modification time.
array files(string|null $directory = null, bool $recursive = false)
Get an array of all files in a directory.
array allFiles(string|null $directory = null)
Get all of the files from the given directory (recursive).
array directories(string|null $directory = null, bool $recursive = false)
Get all of the directories within a given directory.
array allDirectories(string|null $directory = null)
Get all (recursive) of the directories within a given directory.
bool makeDirectory(string $path)
Create a directory.
bool deleteDirectory(string $directory)
Recursively delete a directory.
string url(string $path)
Get the URL for the file at the given path.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/6.x/Illuminate/Contracts/Filesystem/Cloud.html