ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Interface FileWriteAccess. More...
Public Member Functions | |
write (string $path, string $content) | |
Writes the content to a new file. More... | |
update (string $path, string $newContent) | |
Updates the content of a file. More... | |
put (string $path, string $content) | |
Creates a file or updates an existing one. More... | |
delete (string $path) | |
Deletes a file. More... | |
readAndDelete (string $path) | |
Reads the entire file content into a string and removes the file afterwards. More... | |
rename (string $path, string $newPath) | |
Moves a file from the source to the destination. More... | |
copy (string $path, string $copyPath) | |
Copy the source file to a destination. More... | |
Interface FileWriteAccess.
All write file operations of the filesystem service.
Definition at line 22 of file FileWriteAccess.php.
ILIAS\Filesystem\Provider\FileWriteAccess::copy | ( | string | $path, |
string | $copyPath | ||
) |
Copy the source file to a destination.
string | $path | The source path to the file which should be copied. |
string | $copyPath | The destination path of the file copy. |
FileNotFoundException | If the source file does not exist. |
FileAlreadyExistsException | If the destination file already exists. |
IOException | If the file could not be copied to the destination. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.
ILIAS\Filesystem\Provider\FileWriteAccess::delete | ( | string | $path | ) |
Deletes a file.
string | $path | The path to the file which should be deleted. |
FileNotFoundException | If the file was not found. |
IOException | If the file was found but the delete operation finished with errors. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.
ILIAS\Filesystem\Provider\FileWriteAccess::put | ( | string | $path, |
string | $content | ||
) |
Creates a file or updates an existing one.
string | $path | The path to the file which should be created or updated. |
string | $content | The content which should be written to the file. |
IOException | If the file could not be created or updated. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.
ILIAS\Filesystem\Provider\FileWriteAccess::readAndDelete | ( | string | $path | ) |
Reads the entire file content into a string and removes the file afterwards.
string | $path | The file which should be red and removed. |
FileNotFoundException | If the file was not found. |
IOException | If the file could not red or deleted. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.
ILIAS\Filesystem\Provider\FileWriteAccess::rename | ( | string | $path, |
string | $newPath | ||
) |
Moves a file from the source to the destination.
string | $path | The current path of the file which should be moved. |
string | $newPath | The new path of the file. |
FileNotFoundException | If the source file is not found. |
FileAlreadyExistsException | If the destination file is already existing. |
IOException | If the file could not be moved. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.
ILIAS\Filesystem\Provider\FileWriteAccess::update | ( | string | $path, |
string | $newContent | ||
) |
Updates the content of a file.
Replaces the file content with a new one.
string | $path | The path to the file which should be updated. |
string | $newContent | The new file content. |
FileNotFoundException | If the file is not found. |
IOException | If the file could not be updated. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.
ILIAS\Filesystem\Provider\FileWriteAccess::write | ( | string | $path, |
string | $content | ||
) |
Writes the content to a new file.
string | $path | The path to the file which should be created. |
string | $content | The content which should be written to the new file. |
FileAlreadyExistsException | If the file already exists. |
IOException | If the file could not be created or written. |
Implemented in ILIAS\Filesystem\Provider\FlySystem\FlySystemFileAccess, ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator, ILIAS\Filesystem\FilesystemFacade, and ILIAS\Filesystem\Decorator\ReadOnlyDecorator.