Skip to content

File

Node class.

See Also:

  • http://github.com/friendica/red -

Properties

data

The file from attach table.

public array $data

auth

private $auth

See Also:

    • \Sabre\DAV\Auth\Backend\BackendInterface

name

private string $name

os_path

public $os_path

folder_hash

public $folder_hash

Methods

__construct

Sets up the node, expects a full path name.

public __construct(string $name, array $data, mixed& $auth): mixed

Parameters:

Parameter Type Description
$name string
$data array from attach table
$auth mixed

getName

Returns the name of the node.

public getName(): string

setName

Renames the node.

public setName(string $newName): void

Parameters:

Parameter Type Description
$newName string The new name of the file.

Throws:


put

Replaces the contents of the file.

public put(resource $data): void

Parameters:

Parameter Type Description
$data resource

get

Returns the data.

public get(): string

getETag

Returns the ETag for a file.

public getETag(): null|string

getContentType

Returns the mime-type for a file.

public getContentType(): mixed

getSize

Returns the size of the node, in bytes.

public getSize(): int

Return Value:

filesize in bytes


getLastModified

Returns the last modification time as a unix timestamp.

public getLastModified(): int

Return Value:

last modification time in UNIX timestamp


delete

Deletes the current node.

public delete(): mixed

Throws:


Inherited methods

getLastModified

Returns the last modification time as a unix timestamp.

public getLastModified(): int

If the information is not available, return null.


delete

Deletes the current node.

public delete(): mixed

Throws:


setName

Renames the node.

public setName(string $name): mixed

Parameters:

Parameter Type Description
$name string The new name

Throws:



Automatically generated on 2025-03-18