FilesystemAdapter
class FilesystemAdapter implements Filesystem, Cloud mixin FilesystemInterface
Properties
| protected FilesystemInterface | $driver | The Flysystem filesystem implementation. |
Methods
Create a new filesystem adapter instance.
Assert that the given file exists.
Assert that the given file does not exist.
Determine if a file exists.
Get the full path for the file at the given "short" path.
Get the contents of a 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.
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 mime-type of a given file.
Get the file's last modification time.
Get the URL for the file at the given path.
Get the URL for the file at the given path.
Get the URL for the file at the given path.
Get a temporary URL for the file at the given path.
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.
Get the Flysystem driver.
Filter directory contents by type.
Parse the given visibility value.
Pass dynamic methods call onto Flysystem.
Details
at line 39
void
__construct(FilesystemInterface $driver)
Create a new filesystem adapter instance.
at line 50
void
assertExists(string $path)
Assert that the given file exists.
at line 63
void
assertMissing(string $path)
Assert that the given file does not exist.
at line 76
bool
exists(string $path)
Determine if a file exists.
at line 87
string
path(string $path)
Get the full path for the file at the given "short" path.
at line 100
string
get(string $path)
Get the contents of a file.
at line 117
bool
put(string $path, string|resource $contents, array $options = [])
Write the contents of a file.
at line 144
string|false
putFile(string $path, File|UploadedFile $file, array $options = [])
Store the uploaded file on the disk.
at line 158
string|false
putFileAs(string $path, File|UploadedFile $file, string $name, array $options = [])
Store the uploaded file on the disk with a given name.
at line 182
string
getVisibility(string $path)
Get the visibility for the given path.
at line 198
void
setVisibility(string $path, string $visibility)
Set the visibility for the given path.
at line 211
int
prepend(string $path, string $data, string $separator = PHP_EOL)
Prepend to a file.
at line 228
int
append(string $path, string $data, string $separator = PHP_EOL)
Append to a file.
at line 243
bool
delete(string|array $paths)
Delete the file at a given path.
at line 269
bool
copy(string $from, string $to)
Copy a file to a new location.
at line 281
bool
move(string $from, string $to)
Move a file to a new location.
at line 292
int
size(string $path)
Get the file size of a given file.
at line 303
string|false
mimeType(string $path)
Get the mime-type of a given file.
at line 314
int
lastModified(string $path)
Get the file's last modification time.
at line 325
string
url(string $path)
Get the URL for the file at the given path.
at line 347
protected string
getAwsUrl(AwsS3Adapter $adapter, string $path)
Get the URL for the file at the given path.
at line 360
protected string
getLocalUrl(string $path)
Get the URL for the file at the given path.
at line 391
string
temporaryUrl(string $path, DateTimeInterface $expiration, array $options = [])
Get a temporary URL for the file at the given path.
at line 420
array
files(string|null $directory = null, bool $recursive = false)
Get an array of all files in a directory.
at line 433
array
allFiles(string|null $directory = null)
Get all of the files from the given directory (recursive).
at line 445
array
directories(string|null $directory = null, bool $recursive = false)
Get all of the directories within a given directory.
at line 458
array
allDirectories(string|null $directory = null)
Get all (recursive) of the directories within a given directory.
at line 469
bool
makeDirectory(string $path)
Create a directory.
at line 480
bool
deleteDirectory(string $directory)
Recursively delete a directory.
at line 490
FilesystemInterface
getDriver()
Get the Flysystem driver.
at line 502
protected array
filterContentsByType(array $contents, string $type)
Filter directory contents by type.
at line 519
protected string|null
parseVisibility(string|null $visibility)
Parse the given visibility value.
at line 544
mixed
__call(string $method, array $parameters)
Pass dynamic methods call onto Flysystem.