File
Node class.
- Full name:
\Zotlabs\Storage\File
- Parent class:
\Sabre\DAV\Node
- This class implements:
\Sabre\DAV\IFile
See Also:
- http://github.com/friendica/red -
Properties
data
The file from attach table.
auth
See Also:
-
- \Sabre\DAV\Auth\Backend\BackendInterface
name
os_path
folder_hash
Methods
__construct
Sets up the node, expects a full path name.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | |
$data |
array | from attach table |
$auth |
mixed |
getName
Returns the name of the node.
setName
Renames the node.
Parameters:
Parameter | Type | Description |
---|---|---|
$newName |
string | The new name of the file. |
Throws:
put
Replaces the contents of the file.
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
resource |
get
Returns the data.
getETag
Returns the ETag for a file.
getContentType
Returns the mime-type for a file.
getSize
Returns the size of the node, in bytes.
Return Value:
filesize in bytes
getLastModified
Returns the last modification time as a unix timestamp.
Return Value:
last modification time in UNIX timestamp
delete
Deletes the current node.
Throws:
Inherited methods
getLastModified
Returns the last modification time as a unix timestamp.
If the information is not available, return null.
delete
Deletes the current node.
Throws:
setName
Renames the node.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | The new name |
Throws:
Automatically generated on 2025-03-18