ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Filesystem\Provider\FileStreamWriteAccess Interface Reference
+ Inheritance diagram for ILIAS\Filesystem\Provider\FileStreamWriteAccess:
+ Collaboration diagram for ILIAS\Filesystem\Provider\FileStreamWriteAccess:

Public Member Functions

 writeStream (string $path, FileStream $stream)
 Writes the stream to a new file. More...
 
 putStream (string $path, FileStream $stream)
 Creates a new file or updates an existing one. More...
 
 updateStream (string $path, FileStream $stream)
 Updates an existing file. More...
 

Detailed Description

Member Function Documentation

◆ putStream()

ILIAS\Filesystem\Provider\FileStreamWriteAccess::putStream ( string  $path,
FileStream  $stream 
)

Creates a new file or updates an existing one.

If the file is updated its content will be truncated before writing the stream.

The stream will be closed after the write operation is done. Please note that the resource must be detached from the stream in order to write to the file.

Parameters
string$pathThe file which should be used to write the stream into.
FileStream$streamThe stream which should be written to the file.
See also
FileStream::detach()

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

◆ updateStream()

ILIAS\Filesystem\Provider\FileStreamWriteAccess::updateStream ( string  $path,
FileStream  $stream 
)

Updates an existing file.

The file content will be truncated to 0.

The stream will be closed after the write operation is done. Please note that the resource must be detached from the stream in order to write to the file.

Parameters
string$pathThe path to the file which should be updated.
FileStream$streamThe stream which should be used to update the file content.
See also
FileStream::detach()

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

◆ writeStream()

ILIAS\Filesystem\Provider\FileStreamWriteAccess::writeStream ( string  $path,
FileStream  $stream 
)

Writes the stream to a new file.

The directory path to the file will be created.

The stream will be closed after the write operation is done. Please note that the resource must be detached from the stream in order to write to the file.

Parameters
string$pathThe file which should be used to write the stream into.
FileStream$streamThe stream which should be written into the new file.
See also
FileStream::detach()

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


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