\Horde_Dav_File

A file object.

Summary

Methods
Properties
Constants
__construct()
delete()
getName()
getLastModified()
put()
get()
getSize()
getETag()
getContentType()
propPatch()
getProperties()
No public properties found
No constants found
No protected methods found
$_registry
$_path
$_item
$_size
$_propertyMap
N/A
No private methods found
No private properties found
N/A

Properties

$_registry

$_registry : \Horde_Registry

A registry object.

Type

\Horde_Registry

$_path

$_path : string

The path to the current file.

Type

string

$_item

$_item : array

File details.

Type

array

$_size

$_size : integer

File size.

This will only be set if the actual file data is requested, to avoid the overhead of building the file content only to retrieve the file size.

Type

integer

$_propertyMap

$_propertyMap : array

Mapping of WebDAV property names to Horde API's browse() properties.

Type

array

Methods

__construct()

__construct(\Horde_Registry  $registry, string  $path = null, array  $item = array()) 

Constructor.

Parameters

\Horde_Registry $registry

A registry object.

string $path

The path to this file.

array $item

File details.

delete()

delete() 

Deletes the current node.

getName()

getName() : string

Returns the name of the node.

This is used to generate the url.

Returns

string

getLastModified()

getLastModified() : integer

Returns the last modification time, as a unix timestamp

Returns

integer

put()

put(resource  $data) : void

Updates the data

data is a readable stream resource.

Parameters

resource $data

get()

get() : mixed

Returns the data

This method may either return a string or a readable stream resource

Returns

mixed

getSize()

getSize() : integer

Returns the size of the file, in bytes.

Returns

integer

getETag()

getETag() : string|null

Returns the ETag for a file.

Returns

string|null

getContentType()

getContentType() : string|null

Returns the mime-type for a file

If null is returned, we'll assume application/octet-stream

Returns

string|null

propPatch()

propPatch(\PropPatch  $propPatch) : void

Updates properties on this node.

Parameters

\PropPatch $propPatch

getProperties()

getProperties(array  $properties) : void

Returns a list of properties for this nodes.

Parameters

array $properties