FilesystemAdapter
Implements
Uses
Properties
$driver League\...\FilesystemOperator
The Flysystem filesystem implementation.
$adapter League\...\FilesystemAdapter
The Flysystem adapter implementation.
$config array
The filesystem configuration.
$prefixer League\...\PathPrefixer
The Flysystem PathPrefixer instance.
Methods
__construct ( League\...\FilesystemOperator $driver , League\...\FilesystemAdapter $adapter , array $config ) : void
Create a new filesystem adapter instance.
Parameters
- $driver League\...\FilesystemOperator
- $adapter League\...\FilesystemAdapter
- $config array
assertExists ( $path , $content ) : $this
Assert that the given file or directory exists.
Parameters
- $path string|array
- $content string|null
assertMissing ( $path ) : $this
Assert that the given file or directory does not exist.
Parameters
- $path string|array
assertDirectoryEmpty ( $path ) : $this
Assert that the given directory is empty.
Parameters
- $path string
exists ( $path ) : bool
Determine if a file or directory exists.
Parameters
- $path string
missing ( $path ) : bool
Determine if a file or directory is missing.
Parameters
- $path string
fileExists ( $path ) : bool
Determine if a file exists.
Parameters
- $path string
fileMissing ( $path ) : bool
Determine if a file is missing.
Parameters
- $path string
directoryExists ( $path ) : bool
Determine if a directory exists.
Parameters
- $path string
directoryMissing ( $path ) : bool
Determine if a 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|null
Get the contents of a file.
Parameters
- $path string
json ( $path , $flags ) : array|null
Get the contents of a file as decoded JSON.
Parameters
- $path string
- $flags int
response ( $path , $name , array $headers , $disposition ) : Symfony\...\StreamedResponse
Create a streamed response for a given file.
Parameters
- $path string
- $name string|null
- $headers array
- $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
fallbackName ( $name ) : string
Convert the string to ASCII characters that are equivalent to the given name.
Parameters
- $name string
put ( $path , $contents , $options ) : string|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 File |UploadedFile |string
- $file File |UploadedFile |string|array|null
- $options mixed
putFileAs ( $path , $file , $name , $options ) : string|false
Store the uploaded file on the disk with a given name.
Parameters
- $path File |UploadedFile |string
- $file File |UploadedFile |string|array|null
- $name string|array|null
- $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
checksum ( string $path , array $options ) : string|false
Get the checksum for a file.
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
readStream ( $path ) : void
{@inheritdoc}
writeStream ( $path , $resource , array $options ) : void
{@inheritdoc}
url ( $path ) : string
Get the URL for the file at the given path.
Parameters
- $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
providesTemporaryUrls ( ) : bool
Determine if temporary URLs can be generated.
temporaryUrl ( $path , $expiration , array $options ) : string
Get a temporary URL for the file at the given path.
Parameters
- $path string
- $expiration DateTimeInterface
- $options array
temporaryUploadUrl ( $path , $expiration , array $options ) : array
Get a temporary upload URL for the file at the given path.
Parameters
- $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 the directories within a given directory (recursive).
Parameters
- $directory string|null
makeDirectory ( $path ) : bool
Create a directory.
Parameters
- $path string
deleteDirectory ( $directory ) : bool
Recursively delete a directory.
Parameters
- $directory string
getDriver ( ) : League\...\FilesystemOperator
Get the Flysystem driver.
getAdapter ( ) : League\...\FilesystemAdapter
Get the Flysystem adapter.
getConfig ( ) : array
Get the configuration values.
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
throwsExceptions ( ) : bool
Determine if Flysystem exceptions should be thrown.
__call ( $method , $parameters ) : mixed
Pass dynamic methods call onto Flysystem.
Parameters
- $method string
- $parameters array