ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
League\Flysystem\FilesystemInterface Interface Reference
+ Inheritance diagram for League\Flysystem\FilesystemInterface:
+ Collaboration diagram for League\Flysystem\FilesystemInterface:

Public Member Functions

 has ($path)
 Check whether a file exists. More...
 
 read ($path)
 Read a file. More...
 
 readStream ($path)
 Retrieves a read-stream for a path. More...
 
 listContents ($directory='', $recursive=false)
 List contents of a directory. More...
 
 getMetadata ($path)
 Get a file's metadata. More...
 
 getSize ($path)
 Get a file's size. More...
 
 getMimetype ($path)
 Get a file's mime-type. More...
 
 getTimestamp ($path)
 Get a file's timestamp. More...
 
 getVisibility ($path)
 Get a file's visibility. More...
 
 write ($path, $contents, array $config=[])
 Write a new file. More...
 
 writeStream ($path, $resource, array $config=[])
 Write a new file using a stream. More...
 
 update ($path, $contents, array $config=[])
 Update an existing file. More...
 
 updateStream ($path, $resource, array $config=[])
 Update an existing file using a stream. More...
 
 rename ($path, $newpath)
 Rename a file. More...
 
 copy ($path, $newpath)
 Copy a file. More...
 
 delete ($path)
 Delete a file. More...
 
 deleteDir ($dirname)
 Delete a directory. More...
 
 createDir ($dirname, array $config=[])
 Create a directory. More...
 
 setVisibility ($path, $visibility)
 Set the visibility for a file. More...
 
 put ($path, $contents, array $config=[])
 Create a file or update if exists. More...
 
 putStream ($path, $resource, array $config=[])
 Create a file or update if exists. More...
 
 readAndDelete ($path)
 Read and delete a file. More...
 
 get ($path, Handler $handler=null)
 Get a file/directory handler. More...
 
 addPlugin (PluginInterface $plugin)
 Register a plugin. More...
 

Detailed Description

Definition at line 5 of file FilesystemInterface.php.

Member Function Documentation

◆ addPlugin()

League\Flysystem\FilesystemInterface::addPlugin ( PluginInterface  $plugin)

Register a plugin.

Parameters
PluginInterface$pluginThe plugin to register.
Returns
$this

◆ copy()

League\Flysystem\FilesystemInterface::copy (   $path,
  $newpath 
)

Copy a file.

Parameters
string$pathPath to the existing file.
string$newpathThe new path of the file.
Exceptions
FileExistsExceptionThrown if $newpath exists.
FileNotFoundExceptionThrown if $path does not exist.
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ createDir()

League\Flysystem\FilesystemInterface::createDir (   $dirname,
array  $config = [] 
)

Create a directory.

Parameters
string$dirnameThe name of the new directory.
array$configAn optional configuration array.
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ delete()

League\Flysystem\FilesystemInterface::delete (   $path)

Delete a file.

Parameters
string$path
Exceptions
FileNotFoundException
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ deleteDir()

League\Flysystem\FilesystemInterface::deleteDir (   $dirname)

Delete a directory.

Parameters
string$dirname
Exceptions
RootViolationExceptionThrown if $dirname is empty.
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ get()

League\Flysystem\FilesystemInterface::get (   $path,
Handler  $handler = null 
)

Get a file/directory handler.

Parameters
string$pathThe path to the file.
Handler$handlerAn optional existing handler to populate.
Returns
Handler Either a file or directory handler.

Implemented in League\Flysystem\Filesystem.

◆ getMetadata()

League\Flysystem\FilesystemInterface::getMetadata (   $path)

Get a file's metadata.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
array|false The file metadata or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ getMimetype()

League\Flysystem\FilesystemInterface::getMimetype (   $path)

Get a file's mime-type.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
string|false The file mime-type or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ getSize()

League\Flysystem\FilesystemInterface::getSize (   $path)

Get a file's size.

Parameters
string$pathThe path to the file.
Returns
int|false The file size or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ getTimestamp()

League\Flysystem\FilesystemInterface::getTimestamp (   $path)

Get a file's timestamp.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
string|false The timestamp or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ getVisibility()

League\Flysystem\FilesystemInterface::getVisibility (   $path)

Get a file's visibility.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
string|false The visibility (public|private) or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ has()

League\Flysystem\FilesystemInterface::has (   $path)

Check whether a file exists.

Parameters
string$path
Returns
bool

Implemented in League\Flysystem\Filesystem.

◆ listContents()

League\Flysystem\FilesystemInterface::listContents (   $directory = '',
  $recursive = false 
)

List contents of a directory.

Parameters
string$directoryThe directory to list.
bool$recursiveWhether to list recursively.
Returns
array A list of file metadata.

Implemented in League\Flysystem\Filesystem.

◆ put()

League\Flysystem\FilesystemInterface::put (   $path,
  $contents,
array  $config = [] 
)

Create a file or update if exists.

Parameters
string$pathThe path to the file.
string$contentsThe file contents.
array$configAn optional configuration array.
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ putStream()

League\Flysystem\FilesystemInterface::putStream (   $path,
  $resource,
array  $config = [] 
)

Create a file or update if exists.

Parameters
string$pathThe path to the file.
resource$resourceThe file handle.
array$configAn optional configuration array.
Exceptions

Implemented in League\Flysystem\Filesystem.

◆ read()

League\Flysystem\FilesystemInterface::read (   $path)

Read a file.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
string|false The file contents or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ readAndDelete()

League\Flysystem\FilesystemInterface::readAndDelete (   $path)

Read and delete a file.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
string|false The file contents, or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ readStream()

League\Flysystem\FilesystemInterface::readStream (   $path)

Retrieves a read-stream for a path.

Parameters
string$pathThe path to the file.
Exceptions
FileNotFoundException
Returns
resource|false The path resource or false on failure.

Implemented in League\Flysystem\Filesystem.

◆ rename()

League\Flysystem\FilesystemInterface::rename (   $path,
  $newpath 
)

Rename a file.

Parameters
string$pathPath to the existing file.
string$newpathThe new path of the file.
Exceptions
FileExistsExceptionThrown if $newpath exists.
FileNotFoundExceptionThrown if $path does not exist.
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ setVisibility()

League\Flysystem\FilesystemInterface::setVisibility (   $path,
  $visibility 
)

Set the visibility for a file.

Parameters
string$pathThe path to the file.
string$visibilityOne of 'public' or 'private'.
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ update()

League\Flysystem\FilesystemInterface::update (   $path,
  $contents,
array  $config = [] 
)

Update an existing file.

Parameters
string$pathThe path of the existing file.
string$contentsThe file contents.
array$configAn optional configuration array.
Exceptions
FileNotFoundException
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ updateStream()

League\Flysystem\FilesystemInterface::updateStream (   $path,
  $resource,
array  $config = [] 
)

Update an existing file using a stream.

Parameters
string$pathThe path of the existing file.
resource$resourceThe file handle.
array$configAn optional configuration array.
Exceptions

Implemented in League\Flysystem\Filesystem.

◆ write()

League\Flysystem\FilesystemInterface::write (   $path,
  $contents,
array  $config = [] 
)

Write a new file.

Parameters
string$pathThe path of the new file.
string$contentsThe file contents.
array$configAn optional configuration array.
Exceptions
FileExistsException
Returns
bool True on success, false on failure.

Implemented in League\Flysystem\Filesystem.

◆ writeStream()

League\Flysystem\FilesystemInterface::writeStream (   $path,
  $resource,
array  $config = [] 
)

Write a new file using a stream.

Parameters
string$pathThe path of the new file.
resource$resourceThe file handle.
array$configAn optional configuration array.
Exceptions

Implemented in League\Flysystem\Filesystem.


The documentation for this interface was generated from the following file: