Nextcloud PHP API (master)

ICacheEntry extends ArrayAccess

meta data for a file or folder

Tags
since
9.0.0
template-extends

ArrayAccess<string,mixed>

This interface extends \ArrayAccess since v21.0.0, previous versions only implemented it in the private implementation. Hence php would allow using the object as array, while strictly speaking it didn't support this.

Table of Contents

Constants

DIRECTORY_MIMETYPE  = 'httpd/unix-directory'

Methods

getCreationTime()  : int|null
Get the last modified date as unix timestamp
getEtag()  : string
Get the etag for the file
getId()  : int
Get the numeric id of a file
getMetadataEtag()  : string|null
Get the metadata etag for the file
getMimePart()  : string
Get the first part of the mimetype
getMimeType()  : string
Get the full mimetype
getMTime()  : int
Get the last modified date as unix timestamp
getName()  : string
Get the file name
getPath()  : string
Get the path of the file relative to the storage root
getPermissions()  : int
Get the permissions for the file stored as bitwise combination of \OCP\Constants::PERMISSION_READ, \OCP\Constants::PERMISSION_CREATE \OCP\Constants::PERMISSION_UPDATE, \OCP\Constants::PERMISSION_DELETE and \OCP\Constants::PERMISSION_SHARE
getSize()  : int
Get the file size in bytes
getStorageId()  : int
Get the numeric id for the storage
getStorageMTime()  : int
Get the last modified date on the storage as unix timestamp
getUnencryptedSize()  : int
Get the unencrypted size
getUploadTime()  : int|null
Get the last modified date as unix timestamp
isEncrypted()  : bool
Check if the file is encrypted

Constants

DIRECTORY_MIMETYPE

public mixed DIRECTORY_MIMETYPE = 'httpd/unix-directory'
Tags
since
9.0.0

Methods

getCreationTime()

Get the last modified date as unix timestamp

public getCreationTime() : int|null
Tags
since
18.0.0
Return values
int|null

getEtag()

Get the etag for the file

public getEtag() : string

An etag is used for change detection of files and folders, an etag of a file changes whenever the content of the file changes Etag for folders change whenever a file in the folder has changed

Tags
since
9.0.0
Return values
string

getId()

Get the numeric id of a file

public getId() : int
Tags
since
9.0.0
Return values
int

getMetadataEtag()

Get the metadata etag for the file

public getMetadataEtag() : string|null
Tags
since
18.0.0
Return values
string|null

getMimePart()

Get the first part of the mimetype

public getMimePart() : string
Tags
since
9.0.0
Return values
string

getMimeType()

Get the full mimetype

public getMimeType() : string
Tags
since
9.0.0
Return values
string

getMTime()

Get the last modified date as unix timestamp

public getMTime() : int
Tags
since
9.0.0
Return values
int

getName()

Get the file name

public getName() : string
Tags
since
9.0.0
Return values
string

getPath()

Get the path of the file relative to the storage root

public getPath() : string
Tags
since
9.0.0
Return values
string

getPermissions()

Get the permissions for the file stored as bitwise combination of \OCP\Constants::PERMISSION_READ, \OCP\Constants::PERMISSION_CREATE \OCP\Constants::PERMISSION_UPDATE, \OCP\Constants::PERMISSION_DELETE and \OCP\Constants::PERMISSION_SHARE

public getPermissions() : int
Tags
since
9.0.0
Return values
int

getSize()

Get the file size in bytes

public getSize() : int
Tags
since
9.0.0
Return values
int

getStorageId()

Get the numeric id for the storage

public getStorageId() : int
Tags
since
9.0.0
Return values
int

getStorageMTime()

Get the last modified date on the storage as unix timestamp

public getStorageMTime() : int

Note that when a file is updated we also update the mtime of all parent folders to make it visible to the user which folder has had updates most recently This can differ from the mtime on the underlying storage which usually only changes when a direct child is added, removed or renamed

Tags
since
9.0.0
Return values
int

getUnencryptedSize()

Get the unencrypted size

public getUnencryptedSize() : int

This might be different from the result of getSize

Tags
since
25.0.0
Return values
int

getUploadTime()

Get the last modified date as unix timestamp

public getUploadTime() : int|null
Tags
since
18.0.0
Return values
int|null

isEncrypted()

Check if the file is encrypted

public isEncrypted() : bool
Tags
since
9.0.0
Return values
bool

        
On this page

Search results