FilesystemAdapter
Implements
Uses
Properties
$driver League\...\FilesystemInterface
The Flysystem filesystem implementation.
Methods
__construct ( League\...\FilesystemInterface $driver ) : void
Create a new filesystem adapter instance.
Parameters
- $driver League\...\FilesystemInterface
assertExists ( $path , $content ) : $this
Assert that the given file exists.
Parameters
- $path string|array
- $content string|null
assertMissing ( $path ) : $this
Assert that the given file does not exist.
Parameters
- $path string|array
exists ( $path ) : bool
Determine if a file exists.
Parameters
- $path string
missing ( $path ) : bool
Determine if a file or directory is missing.
Parameters
- $path string
path ( $path ) : string
Get the full path for the file at the given "short" path.
Parameters
- $path string
get ( $path ) : string
Get the contents of a file.
Parameters
- $path string
response ( $path , $name , array $headers , $disposition ) : Symfony\...\StreamedResponse
Create a streamed response for a given file.
Parameters
- $path string
- $name string|null
- $headers array|null
- $disposition string|null
download ( $path , $name , array $headers ) : Symfony\...\StreamedResponse
Create a streamed download response for a given file.
Parameters
- $path string
- $name string|null
- $headers array|null
fallbackName ( $name ) : string
Convert the string to ASCII characters that are equivalent to the given name.
Parameters
- $name string
put ( $path , $contents , $options ) : bool
Write the contents of a file.
Parameters
- $path string
- $contents Psr\...\StreamInterface|File |UploadedFile |string|resource
- $options mixed
putFile ( $path , $file , $options ) : string|false
Store the uploaded file on the disk.
Parameters
- $path string
- $file File |UploadedFile |string
- $options mixed
putFileAs ( $path , $file , $name , $options ) : string|false
Store the uploaded file on the disk with a given name.
Parameters
- $path string
- $file File |UploadedFile |string
- $name string
- $options mixed
getVisibility ( $path ) : string
Get the visibility for the given path.
Parameters
- $path string
setVisibility ( $path , $visibility ) : bool
Set the visibility for the given path.
Parameters
- $path string
- $visibility string
prepend ( $path , $data , $separator ) : bool
Prepend to a file.
Parameters
- $path string
- $data string
- $separator string
append ( $path , $data , $separator ) : bool
Append to a file.
Parameters
- $path string
- $data string
- $separator string
delete ( $paths ) : bool
Delete the file at a given path.
Parameters
- $paths string|array
copy ( $from , $to ) : bool
Copy a file to a new location.
Parameters
- $from string
- $to string
move ( $from , $to ) : bool
Move a file to a new location.
Parameters
- $from string
- $to string
size ( $path ) : int
Get the file size of a given file.
Parameters
- $path string
mimeType ( $path ) : string|false
Get the mime-type of a given file.
Parameters
- $path string
lastModified ( $path ) : int
Get the file's last modification time.
Parameters
- $path string
url ( $path ) : string
Get the URL for the file at the given path.
Parameters
- $path string
readStream ( $path ) : void
{@inheritdoc}
writeStream ( $path , $resource , array $options ) : void
{@inheritdoc}
getAwsUrl ( $adapter , $path ) : string
Get the URL for the file at the given path.
Parameters
- $adapter League\...\AwsS3Adapter
- $path string
getFtpUrl ( $path ) : string
Get the URL for the file at the given path.
Parameters
- $path string
getLocalUrl ( $path ) : string
Get the URL for the file at the given path.
Parameters
- $path string
temporaryUrl ( $path , $expiration , array $options ) : string
Get a temporary URL for the file at the given path.
Parameters
- $path string
- $expiration DateTimeInterface
- $options array
getAwsTemporaryUrl ( $adapter , $path , $expiration , $options ) : string
Get a temporary URL for the file at the given path.
Parameters
- $adapter League\...\AwsS3Adapter
- $path string
- $expiration DateTimeInterface
- $options array
concatPathToUrl ( $url , $path ) : string
Concatenate a path to a URL.
Parameters
- $url string
- $path string
replaceBaseUrl ( $uri , $url ) : Psr\...\UriInterface
Replace the scheme, host and port of the given UriInterface with values from the given URL.
Parameters
- $uri Psr\...\UriInterface
- $url string
files ( $directory , $recursive ) : array
Get an array of all files in a directory.
Parameters
- $directory string|null
- $recursive bool
allFiles ( $directory ) : array
Get all of the files from the given directory (recursive).
Parameters
- $directory string|null
directories ( $directory , $recursive ) : array
Get all of the directories within a given directory.
Parameters
- $directory string|null
- $recursive bool
allDirectories ( $directory ) : array
Get all (recursive) of the directories within a given directory.
Parameters
- $directory string|null
makeDirectory ( $path ) : bool
Create a directory.
Parameters
- $path string
deleteDirectory ( $directory ) : bool
Recursively delete a directory.
Parameters
- $directory string
flushCache ( ) : void
Flush the Flysystem cache.
getDriver ( ) : League\...\FilesystemInterface
Get the Flysystem driver.
filterContentsByType ( $contents , $type ) : array
Filter directory contents by type.
Parameters
- $contents array
- $type string
parseVisibility ( $visibility ) : string|null
Parse the given visibility value.
Parameters
- $visibility string|null
buildTemporaryUrlsUsing ( Closure $callback ) : void
Define a custom temporary URL builder callback.
Parameters
- $callback Closure
__call ( $method , array $parameters ) : mixed
Pass dynamic methods call onto Flysystem.
Parameters
- $method string
- $parameters array