ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS\Filesystem\Provider\DirectoryWriteAccess Interface Reference

Interface DirectoryWriteAccess. More...

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

Public Member Functions

 createDir (string $path, string $visibility=Visibility::PUBLIC_ACCESS)
 Create a new directory. More...
 
 copyDir (string $source, string $destination)
 Copy all childes of the source recursive to the destination. More...
 
 deleteDir (string $path)
 Deletes a directory recursive. More...
 

Detailed Description

Interface DirectoryWriteAccess.

Defines the write operations of the directory access.

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 22 of file DirectoryWriteAccess.php.

Member Function Documentation

◆ copyDir()

ILIAS\Filesystem\Provider\DirectoryWriteAccess::copyDir ( string  $source,
string  $destination 
)

Copy all childes of the source recursive to the destination.

The file access rights will be copied as well.

The operation will fail fast if the destination directory is not empty. All destination folders will be created if needed.

Parameters
string$sourceThe source which should be scanned and copied.
string$destinationThe destination of the recursive copy.
Exceptions
IOExceptionThrown if the directory could not be copied.
DirectoryNotFoundExceptionThrown if the source directory could not be found.
Returns
void
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.

◆ createDir()

ILIAS\Filesystem\Provider\DirectoryWriteAccess::createDir ( string  $path,
string  $visibility = Visibility::PUBLIC_ACCESS 
)

Create a new directory.

Please note that the Visibility interface defines two constants PUBLIC_ACCESS and PRIVATE_ACCESS to ease the development process.

Parameters
string$pathThe directory path which should be created.
string$visibilityThe visibility of the directory. Defaults to visibility public.
Returns
void
Exceptions
IOExceptionIf the directory could not be created.

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

◆ deleteDir()

ILIAS\Filesystem\Provider\DirectoryWriteAccess::deleteDir ( string  $path)

Deletes a directory recursive.

Parameters
string$pathThe path which should be deleted.
Returns
void
Exceptions
IOExceptionIf the path could not be deleted.
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: