FilesystemAdapter

FilesystemAdapter

class FilesystemAdapter implements Filesystem, Cloud (View source)

Methods

void __construct(FilesystemInterface $driver)

Create a new filesystem adapter instance.

bool exists(string $path)

Determine if a file exists.

string get(string $path)

Get the contents of a file.

bool put(string $path, string|resource $contents, string $visibility = null)

Write the contents of a file.

string|false putFile(string $path, UploadedFile $file, string $visibility = null)

Store the uploaded file on the disk.

string|false putFileAs(string $path, File|UploadedFile $file, string $name, string $visibility = null)

Store the uploaded file on the disk with a given name.

string getVisibility(string $path)

Get the visibility for the given path.

void setVisibility(string $path, string $visibility)

Set the visibility for the given path.

int prepend(string $path, string $data, string $separator = PHP_EOL)

Prepend to a file.

int append(string $path, string $data, string $separator = PHP_EOL)

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.

string|false mimeType(string $path)

Get the mime-type of a given file.

int lastModified(string $path)

Get the file's last modification time.

string url(string $path)

Get the URL for the file at the given path.

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.

FilesystemInterface getDriver()

Get the Flysystem driver.

mixed __call(string $method, array $parameters)

Pass dynamic methods call onto Flysystem.

doc_Laravel
2016-11-02 16:18:43
Comments
Leave a Comment

Please login to continue.