Class: FileInfo

OC.Files.FileInfo(data)

File information

Constructor

new FileInfo(data)

Parameters:
Name Type Description
data Object file data, see attributes for details
Since:
  • 8.2
Source:

Members

etag :String

Etag
Type:
  • String
Source:

hasPreview :boolean

Type:
  • boolean
Source:

icon :String

Icon URL. Can be used to override the mime type icon.
Type:
  • String
Source:

id :int

File id
Type:
Source:

mimetype :String

Mime type
Type:
  • String
Source:

mountType :string

Mount type. One of null, "external-root", "shared" or "shared-root"
Type:
Source:

mtime :int

Modification time
Type:
Source:

name :String

File name
Type:
  • String
Source:

path :String

Path leading to the file, without the file name, and with a leading slash.
Type:
  • String
Source:

permissions :int

Permissions.
Type:
Source:
See:
  • OC#PERMISSION_ALL for permissions

sharePermissions :int

Type:
Source:

type :String

File type. 'file' for files, 'dir' for directories.
Type:
  • String
Deprecated:
  • rely on mimetype instead
Source:

OC.Files.FileInfo(attributes, mountType)

File information

Constructor

new FileInfo(attributes, mountType)

Parameters:
Name Type Description
attributes Object file data
Properties
Name Type Description
id int file id
name string file name
path string path leading to the file, without the file name and with a leading slash
size int size
mimetype string mime type
icon string icon URL
permissions int permissions
mtime Date modification time
etag string etag
mountType string mount type
Since:
  • 8.2
Source:

Members

etag :String

Etag
Type:
  • String
Source:

hasPreview :boolean

Type:
  • boolean
Source:

icon :String

Icon URL. Can be used to override the mime type icon.
Type:
  • String
Source:

id :int

File id
Type:
Source:

mimetype :String

Mime type
Type:
  • String
Source:

mountType :string

Mount type. One of null, "external-root", "shared" or "shared-root"
Type:
Source:

mtime :int

Modification time
Type:
Source:

name :String

File name
Type:
  • String
Source:

path :String

Path leading to the file, without the file name, and with a leading slash.
Type:
  • String
Source:

permissions :int

Permissions.
Type:
Source:
See:
  • OC#PERMISSION_ALL for permissions

sharePermissions :int

Type:
Source:

type :String

File type. 'file' for files, 'dir' for directories.
Type:
  • String
Deprecated:
  • rely on mimetype instead
Source: