ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 (string $path)
 Checks whether the directory exists or not. More...
 
 listContents (string $path='', bool $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 ( string  $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\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.

◆ listContents()

ILIAS\Filesystem\Provider\DirectoryReadAccess::listContents ( string  $path = '',
bool  $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\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.


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