FileInfo¶
-
interface
OCP\Files\FileInfo¶ - Interface FileInfo
Implemented by: OC\Files\FileInfoSource: lib/public/Files/FileInfo.php#37
Constants¶
-
TYPE_FILE = file Source: lib/public/Files/FileInfo.php#41 Since: 7.0.0
-
TYPE_FOLDER = dir Source: lib/public/Files/FileInfo.php#45 Since: 7.0.0
-
SPACE_NOT_COMPUTED = -1 Source: lib/public/Files/FileInfo.php#51 Since: 8.0.0
-
SPACE_UNKNOWN = -2 Source: lib/public/Files/FileInfo.php#56 Since: 8.0.0
-
SPACE_UNLIMITED = -3 Source: lib/public/Files/FileInfo.php#61 Since: 8.0.0
-
MIMETYPE_FOLDER = httpd/unix-directory Source: lib/public/Files/FileInfo.php#66 Since: 9.1.0
-
BLACKLIST_FILES_REGEX = \.(part|filepart)$ Source: lib/public/Files/FileInfo.php#72 Since: 12.0.0
Methods¶
-
public
OCP\Files\FileInfo::getEtag()¶ - Get the Etag of the file or folder
Source: lib/public/Files/FileInfo.php#80 Returns: string Since: 7.0.0
-
public
OCP\Files\FileInfo::getSize($includeMounts=true)¶ - Get the size in bytes for the file or folder
Source: Parameters: - $includeMounts (bool) whether or not to include the size of any sub mounts, since 16.0.0
Returns: int
Since: 7.0.0
-
public
OCP\Files\FileInfo::getMtime()¶ - Get the last modified date as timestamp for the file or folder
Source: lib/public/Files/FileInfo.php#97 Returns: int Since: 7.0.0
-
public
OCP\Files\FileInfo::getName()¶ - Get the name of the file or folder
Source: lib/public/Files/FileInfo.php#105 Returns: string Since: 7.0.0
-
public
OCP\Files\FileInfo::getInternalPath()¶ - Get the path relative to the storage
Source: lib/public/Files/FileInfo.php#113 Returns: string Since: 7.0.0
-
public
OCP\Files\FileInfo::getPath()¶ - Get the absolute path
Source: lib/public/Files/FileInfo.php#121 Returns: string Since: 7.0.0
-
public
OCP\Files\FileInfo::getMimetype()¶ - Get the full mimetype of the file or folder i.e. ‘image/png’
Source: lib/public/Files/FileInfo.php#129 Returns: string Since: 7.0.0
-
public
OCP\Files\FileInfo::getMimePart()¶ - Get the first part of the mimetype of the file or folder i.e. ‘image’
Source: lib/public/Files/FileInfo.php#137 Returns: string Since: 7.0.0
-
public
OCP\Files\FileInfo::getStorage()¶ - Get the storage the file or folder is storage on
Source: lib/public/Files/FileInfo.php#145 Returns: \OCP\Files\StorageSince: 7.0.0
-
public
OCP\Files\FileInfo::getId()¶ - Get the file id of the file or folder
Source: lib/public/Files/FileInfo.php#153 Returns: int | null Since: 7.0.0
-
public
OCP\Files\FileInfo::isEncrypted()¶ - Check whether the file is encrypted
Source: lib/public/Files/FileInfo.php#161 Returns: bool Since: 7.0.0
-
public
OCP\Files\FileInfo::getPermissions()¶ - 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
Source: lib/public/Files/FileInfo.php#175 Returns: int Since: 7.0.0 - namespace of constants has changed in 8.0.0
-
public
OCP\Files\FileInfo::getType()¶ - Check whether this is a file or a folder
Source: lib/public/Files/FileInfo.php#183 Returns: string \OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER Since: 7.0.0
-
public
OCP\Files\FileInfo::isReadable()¶ - Check if the file or folder is readable
Source: lib/public/Files/FileInfo.php#191 Returns: bool Since: 7.0.0
-
public
OCP\Files\FileInfo::isUpdateable()¶ - Check if a file is writable
Source: lib/public/Files/FileInfo.php#199 Returns: bool Since: 7.0.0
-
public
OCP\Files\FileInfo::isCreatable()¶ - Check whether new files or folders can be created inside this folder
Source: lib/public/Files/FileInfo.php#207 Returns: bool Since: 8.0.0
-
public
OCP\Files\FileInfo::isDeletable()¶ - Check if a file or folder can be deleted
Source: lib/public/Files/FileInfo.php#215 Returns: bool Since: 7.0.0
- Check if a file or folder can be shared
Source: lib/public/Files/FileInfo.php#223 Returns: bool Since: 7.0.0
- Check if a file or folder is shared
Source: lib/public/Files/FileInfo.php#231 Returns: bool Since: 7.0.0
-
public
OCP\Files\FileInfo::isMounted()¶ - Check if a file or folder is mounted
Source: lib/public/Files/FileInfo.php#239 Returns: bool Since: 7.0.0
-
public
OCP\Files\FileInfo::getMountPoint()¶ - Get the mountpoint the file belongs to
Source: lib/public/Files/FileInfo.php#247 Returns: \OCP\Files\Mount\IMountPointSince: 8.0.0
-
public
OCP\Files\FileInfo::getOwner()¶ - Get the owner of the file
Source: lib/public/Files/FileInfo.php#255 Returns: \OCP\IUserSince: 9.0.0
-
public
OCP\Files\FileInfo::getChecksum()¶ - Get the stored checksum for this file
Source: lib/public/Files/FileInfo.php#263 Returns: string Since: 9.0.0
-
public
OCP\Files\FileInfo::getExtension()¶ - Get the extension of the file
Source: lib/public/Files/FileInfo.php#271 Returns: string Since: 15.0.0
-
public
OCP\Files\FileInfo::getCreationTime()¶ - Get the creation date as unix timestampIf the creation time is not known, 0 will be returnedcreation time is not set automatically by the server and is generally only availablefor files uploaded by the sync clients
Source: lib/public/Files/FileInfo.php#284 Returns: int Since: 18.0.0
-
public
OCP\Files\FileInfo::getUploadTime()¶ - Get the upload date as unix timestampIf the upload time is not known, 0 will be returnedUpload time will be set automatically by the server for files uploaded over DAVfiles created by Nextcloud apps generally do not have an the upload time set
Source: lib/public/Files/FileInfo.php#297 Returns: int Since: 18.0.0