ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($name, $contents, $mimeType=null) | |
Creates this node. More... | |
getName () | |
Returns the node name for this file. More... | |
get () | |
Returns the data. More... | |
getSize () | |
Returns the size of the file, in bytes. More... | |
getETag () | |
Returns the ETag for a file. More... | |
getContentType () | |
Returns the mime-type for a file. More... | |
![]() | |
put ($data) | |
Replaces the contents of the file. More... | |
get () | |
Returns the data. More... | |
getSize () | |
Returns the size of the file, in bytes. More... | |
getETag () | |
Returns the ETag for a file. More... | |
getContentType () | |
Returns the mime-type for a file. More... | |
![]() | |
getLastModified () | |
Returns the last modification time as a unix timestamp. More... | |
delete () | |
Deletes the current node. More... | |
setName ($name) | |
Renames the node. More... | |
Protected Attributes | |
$contents = [] | |
$name | |
$mimeType | |
The 'SimpleFile' class is used to easily add read-only immutable files to the directory structure. One usecase would be to add a 'readme.txt' to a root of a webserver with some standard content.
Definition at line 16 of file SimpleFile.php.
Sabre\DAV\SimpleFile::__construct | ( | $name, | |
$contents, | |||
$mimeType = null |
|||
) |
Creates this node.
The name of the node must be passed, as well as the contents of the file.
string | $name | |
string | $contents | |
string | null | $mimeType |
Definition at line 49 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$contents, Sabre\DAV\SimpleFile\$mimeType, and Sabre\DAV\SimpleFile\$name.
Sabre\DAV\SimpleFile::get | ( | ) |
Returns the data.
This method may either return a string or a readable stream resource
Implements Sabre\DAV\IFile.
Definition at line 77 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$contents.
Sabre\DAV\SimpleFile::getContentType | ( | ) |
Returns the mime-type for a file.
If null is returned, we'll assume application/octet-stream
Implements Sabre\DAV\IFile.
Definition at line 115 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$mimeType.
Sabre\DAV\SimpleFile::getETag | ( | ) |
Returns the ETag for a file.
An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. The ETag is an arbitrary string, but MUST be surrounded by double-quotes.
Return null if the ETag can not effectively be determined
Implements Sabre\DAV\IFile.
Definition at line 103 of file SimpleFile.php.
Sabre\DAV\SimpleFile::getName | ( | ) |
Returns the node name for this file.
This name is used to construct the url.
Implements Sabre\DAV\INode.
Definition at line 64 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$name.
Sabre\DAV\SimpleFile::getSize | ( | ) |
Returns the size of the file, in bytes.
Implements Sabre\DAV\IFile.
Definition at line 88 of file SimpleFile.php.
|
protected |
Definition at line 23 of file SimpleFile.php.
Referenced by Sabre\DAV\SimpleFile\__construct(), and Sabre\DAV\SimpleFile\get().
|
protected |
Definition at line 37 of file SimpleFile.php.
Referenced by Sabre\DAV\SimpleFile\__construct(), and Sabre\DAV\SimpleFile\getContentType().
|
protected |
Definition at line 30 of file SimpleFile.php.
Referenced by Sabre\DAV\SimpleFile\__construct(), and Sabre\DAV\SimpleFile\getName().