Nextcloud PHP API (stable18)

ICacheEntry

meta data for a file or folder

Tags
since
9.0.0

Table of Contents

DIRECTORY_MIMETYPE  = 'httpd/unix-directory'
getCreationTime()  : int
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
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\PERMISSION_READ, \OCP\PERMISSION_CREATE \OCP\PERMISSION_UPDATE, \OCP\PERMISSION_DELETE and \OCP\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
getUploadTime()  : int
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'

Methods

getCreationTime()

Get the last modified date as unix timestamp

public getCreationTime() : int
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
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\PERMISSION_READ, \OCP\PERMISSION_CREATE \OCP\PERMISSION_UPDATE, \OCP\PERMISSION_DELETE and \OCP\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

getUploadTime()

Get the last modified date as unix timestamp

public getUploadTime() : int
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

Search results