Constants

TYPE_FILE

TYPE_FILE

TYPE_FOLDER

TYPE_FOLDER

SPACE_NOT_COMPUTED

SPACE_NOT_COMPUTED

SPACE_UNKNOWN

SPACE_UNKNOWN

SPACE_UNLIMITED

SPACE_UNLIMITED

BLACKLIST_FILES_REGEX

BLACKLIST_FILES_REGEX

Methods

getEtag()

getEtag() : string

Get the Etag of the file or folder

Returns

string

getSize()

getSize() : integer

Get the size in bytes for the file or folder

Returns

integer

getMtime()

getMtime() : integer

Get the last modified date as timestamp for the file or folder

Returns

integer

getName()

getName() : string

Get the name of the file or folder

Returns

string

getInternalPath()

getInternalPath() : string

Get the path relative to the storage

Returns

string

getPath()

getPath() : string

Get the absolute path

Returns

string

getMimetype()

getMimetype() : string

Get the full mimetype of the file or folder i.e. 'image/png'

Returns

string

getMimePart()

getMimePart() : string

Get the first part of the mimetype of the file or folder i.e. 'image'

Returns

string

getStorage()

getStorage() : \OCP\Files\Storage

Get the storage the file or folder is storage on

Returns

\OCP\Files\Storage

getId()

getId() : integer

Get the file id of the file or folder

Returns

integer

isEncrypted()

isEncrypted() : boolean

Check whether the file is encrypted

Returns

boolean

getPermissions()

getPermissions() : integer

Get the permissions of the file or folder as bitmasked combination of the following constants \OCP\Constants::PERMISSION_CREATE \OCP\Constants::PERMISSION_READ \OCP\Constants::PERMISSION_UPDATE \OCP\Constants::PERMISSION_DELETE \OCP\Constants::PERMISSION_SHARE \OCP\Constants::PERMISSION_ALL

Returns

integer

isReadable()

isReadable() : boolean

Check if the file or folder is readable

Returns

boolean

isUpdateable()

isUpdateable() : boolean

Check if a file is writable

Returns

boolean

isCreatable()

isCreatable() : boolean

Check whether new files or folders can be created inside this folder

Returns

boolean

isDeletable()

isDeletable() : boolean

Check if a file or folder can be deleted

Returns

boolean

isShareable()

isShareable() : boolean

Check if a file or folder can be shared

Returns

boolean

isShared()

isShared() : boolean

Check if a file or folder is shared

Returns

boolean

isMounted()

isMounted() : boolean

Check if a file or folder is mounted

Returns

boolean

getMountPoint()

getMountPoint() : \OCP\Files\Mount\IMountPoint

Get the mountpoint the file belongs to

Returns

\OCP\Files\Mount\IMountPoint

getOwner()

getOwner() : \OCP\IUser

Get the owner of the file

Returns

\OCP\IUser

getChecksum()

getChecksum() : string

Get the stored checksum for this file

Returns

string