ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ILIAS\Filesystem\Provider\DirectoryReadAccess Interface Reference

Interface DirectoryReadAccess. More...

+ Inheritance diagram for ILIAS\Filesystem\Provider\DirectoryReadAccess:
+ Collaboration diagram for ILIAS\Filesystem\Provider\DirectoryReadAccess:

Public Member Functions

 hasDir ($path)
 Checks whether the directory exists or not. More...
 
 listContents ($path='', $recursive=false)
 Lists the content of a directory. More...
 

Detailed Description

Interface DirectoryReadAccess.

Defines the readonly directory access operations of the filesystem.

Author
Nicolas Schäfli ns@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Since
5.3
Version
1.0
See also
DirectoryAccess

Definition at line 21 of file DirectoryReadAccess.php.

Member Function Documentation

◆ hasDir()

ILIAS\Filesystem\Provider\DirectoryReadAccess::hasDir (   $path)

Checks whether the directory exists or not.

Parameters
string$pathThe path which should be checked.
Returns
bool True if the directory exists otherwise false.
Since
5.3
Version
1.0

Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemDirectoryAccess, ILIAS\Filesystem\FilesystemFacade, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.

◆ listContents()

ILIAS\Filesystem\Provider\DirectoryReadAccess::listContents (   $path = '',
  $recursive = false 
)

Lists the content of a directory.

Parameters
string$pathThe directory which should listed. Defaults to the adapter root directory.
bool$recursiveSet to true if the child directories also should be listed. Defaults to false.
Returns
Metadata[] An array of metadata about all known files, in the given directory.
Exceptions
DirectoryNotFoundExceptionIf the directory is not found or inaccessible.
Since
5.3
Version
1.0

Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemDirectoryAccess, ILIAS\Filesystem\FilesystemFacade, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.


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