Class Info |
|---|
public final class File extends GenericJson File metadata class. |
Qualifier and Type | Class Name and Description | |
|---|---|---|
static final Class | Declaration of the File.Capabilities class, a class of the current user's permissions for the current file. Each permission corresponds to an action that can be taken by the user. | |
static final Class | Declaration of the File.ContentExtras class, a class of additional information about file content. The additional information is optional and is not contained in the response. | |
static final Class | Declaration of the File.PictureMetadata class, a class of additional metadata of media files. | |
static final Class | Declaration of the File.VideoMetadata class, a class of additional video media metadata. | |
Qualifier and Type | Method Name and Description |
|---|---|
clone() Clones a File object. | |
Map<String, String> | Obtains custom file attributes that are private to the requesting app. |
| Obtains the current user's permissions for the file. Each permission corresponds to an action that can be taken by the user. | |
String | Obtains the resource type. |
List<String> | Obtains the types of space that may contain the file. The options include drive and applicationData. |
String | Obtains the link for downloading the file in a browser. |
| Obtains additional information about file content. | |
String | Obtains the version number of the entity file content. |
DateTime | Obtains the time when the file or folder is created, in RFC 3339 date-time format. |
String | Obtains the short description of the file or folder. |
Boolean | Checks whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. |
Boolean | Checks whether the file is modified by the current user. |
DateTime | Obtains the last time when the file is modified by the current user. |
DateTime | Obtains the last time when the file or folder is modified, in RFC 3339 date-time format. |
Boolean | Checks whether the file has a thumbnail. |
Boolean | Checks whether the file or folder is marked. |
String | Obtains the name of the file or folder. |
String | Obtains the full file name extension. |
String | Obtains the full file name suffix extracted from the fileName field. |
Boolean | Checks whether the file is shared. |
String | Obtains the link to the icon of the file. |
String | getId() Obtains the ID of the file or folder. |
Boolean | Checks whether the file is created or opened by the requesting app. |
| Obtains information about the last user who modifies the file. | |
String | Obtains the latest file version ID. |
String | Obtains the MIME type of the file or folder. |
Long | Obtains the storage space occupied by the file. |
String | Obtains the link to preview files online in a browser. |
String | Obtains the original file name. |
Boolean | Checks whether the user owns the file. |
List<User> | Obtains the users to whom the file or folder belongs. |
List<String> | Obtains the parent folder ID of the file. |
List<String> | Obtains the IDs of permissions for users to access the file. |
List<Permission> | Obtains the list of all permissions for the file. Only the user who shares the file has the permissions, and users who access the file on the drive do not. |
| Obtains the additional metadata of a media file. | |
Map<String, String> | Obtains custom file attributes that are visible to all apps. |
Boolean | Checks whether the file or folder has been moved to the recycle bin. |
DateTime | Obtains the time when the file is moved to the recycle bin. |
| Obtains the user who moves the file to the recycle bin. | |
String | Obtains the SHA-256 value for verifying the file. |
| Obtains the user who shares the file. | |
DateTime | Obtains the time when the file is shared by a user. |
Long | getSize() Obtains the size of the file. The size attribute is applicable only to files. |
String | getSmallThumbnailDownloadLink() Obtains the link to the small thumbnail of the file. |
String | Obtains the link to the thumbnail of the file. |
Long | Obtains the thumbnail version number. |
Long | Obtains the increasing version number of a file. |
| Obtains additional video media metadata. | |
Boolean | getWritersHasSharePermission() Checks whether a user who has only the write permission for the file can modify the file. |
Boolean | Checks whether readers and commenters of the file have the copy, print, and download permissions for the file. |
set(String fieldName, Object value) Sets a custom attribute and its value. | |
setAppSettings(Map<String, String> appSettings) Sets custom file attributes that are private to the requesting app. | |
setCapabilities(Capabilities capabilities) Sets the current user's permissions for the file. Each permission corresponds to an action that can be taken by the user. | |
setCategory(String category) Sets the resource type. The value is always drive#file. | |
setContainers(List<String> containers) Sets the types of space that may contain the file. The options include drive and applicationData. | |
setContentDownloadLink(String contentDownloadLink) Sets the link for downloading the file in a browser. | |
setContentExtras(ContentExtras contentExtras) Sets additional information about file content. | |
setContentVersion(String contentVersion) Sets the version number of the entity file content. | |
setCreatedTime(DateTime createdTime) Sets the time when the file or folder is created, in RFC 3339 date-time format. | |
setDescription(String description) Sets the short description of the file or folder. | |
setDirectlyRecycled(Boolean directlyRecycled) Sets whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. | |
setEditedByMe(Boolean editedByMe) Sets whether the file is modified by the current user. | |
setEditedByMeTime(DateTime editedByMeTime) Sets the last time when the file is modified by the current user, in RFC 3339 date-time format. | |
setEditedTime(DateTime editedTime) Sets the last time when the file or folder is modified, in RFC 3339 date-time format. | |
setExistThumbnail(Boolean existThumbnail) Sets whether the file has a thumbnail. | |
setFavorite(Boolean favorite) Sets whether the file or folder is marked. | |
setFileName(String fileName) Sets the name of the file or folder. | |
setFileSuffix(String fileSuffix) Sets the full file name extension. | |
setFullFileSuffix(String fullFileSuffix) Sets the full file name extension extracted from the fileName field. | |
setHasShared(Boolean hasShared) Sets whether the file is shared. | |
setIconDownloadLink(String iconDownloadLink) Sets the link to the icon of the file. | |
setId(String id) Sets the ID of the file or folder. | |
setIsAppAuthorized(Boolean isAppAuthorized) Sets whether the file is created or opened by the requesting app. | |
setLastEditor(User lastEditor) Sets information about the last user who modifies the file. | |
setLastHistoryVersionId(String lastHistoryVersionId) Sets the latest file version ID. | |
setMimeType(String mimeType) Sets the MIME type of the file or folder. | |
setOccupiedSpace(Long occupiedSpace) Sets the storage space occupied by the file. | |
setOnLineViewLink(String onLineViewLink) Sets the link to preview files online in a browser. | |
setOriginalFilename(String originalFilename) Sets the original file name. | |
setOwnedByMe(Boolean ownedByMe) Sets whether the user owns the file. | |
| Sets the users to whom the file or folder belongs. | |
setParentFolder(List<String> parentFolder) Sets the parent folder ID of the file. | |
setPermissionIds(List<String> permissionIds) Sets the IDs of permissions for users to access the file. | |
setPermissions(List<Permission> permissions) Sets the list of all permissions for the file. | |
setPictureMetadata(File.PictureMetadata pictureMetadata) Sets the additional metadata of a media file. | |
setProperties(Map<String, String> properties) Sets custom file attributes that are visible to all apps. | |
setRecycled(Boolean recycled) Sets whether the file or folder has been moved to the recycle bin. | |
setRecycledTime(DateTime recycledTime) Sets the time when a file is moved to the recycle bin, in RFC 3339 date-time format. | |
setRecyclingUser(User recyclingUser) Sets the user who moves the file to the recycle bin. | |
setSharedWithMeTime(DateTime sharedWithMeTime) Sets the time when the file is shared by a user, in RFC 3339 date-time format. | |
setSha256(String sha256) Sets the SHA-256 value for verifying the file. | |
| Sets the user who shares the file. | |
setSize(Long size) Sets the size of the file. The size attribute is applicable only to files. | |
setSmallThumbnailDownloadLink(String smallThumbnailDownloadLink) Sets the link to the small thumbnail of the file. The link is set only when the requesting app has the permission to access the file content. | |
setThumbnailDownloadLink(String thumbnailDownloadLink) Sets the link to the thumbnail of the file. The link is set only when the requesting app has the permission to access the file content. | |
setThumbnailVersion(Long thumbnailVersion) Sets the thumbnail version number. | |
setVersion(Long version) Sets the increasing version number of a file. | |
setVideoMetadata(File.VideoMetadata videoMetadata) Sets additional video media metadata. | |
setWriterHasCopyPermission(Boolean writerHasCopyPermission) Sets whether readers and commenters of the file have the copy, print, and download permissions for the file. | |
setWritersHasSharePermission(Boolean writersHasSharePermission) Sets whether a user who has only the write permission for the file can modify the file. |
Method |
|---|
public String getCategory() Obtains the resource type. |
Returns
Type | Description |
|---|---|
String | Resource type. The value is always drive#file. |
Method |
|---|
public File setCategory(String category) Sets the resource type. The value is always drive#file. |
Parameters
Name | Description |
|---|---|
category | Resource type. The value is always drive#file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getId() Obtains the unique ID of the file or folder. |
Returns
Type | Description |
|---|---|
String | Unique ID of the file or folder. |
Method |
|---|
public File setId(String id) Sets the unique ID of the file or folder. |
Parameters
Name | Description |
|---|---|
id | Unique ID of the file or folder. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getFileName() Obtains the name of the file or folder. |
Returns
Type | Description |
|---|---|
String | File or folder name. |
Method |
|---|
public File setFileName(String fileName) Sets the name of the file or folder. |
Parameters
Name | Description |
|---|---|
fileName | File or folder name, which cannot contain any of the following characters: \ / : * ? " < > | |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Long getSize() Obtains the size of the file. The size attribute is applicable only to files. |
Returns
Type | Description |
|---|---|
Long | File size. |
Method |
|---|
public File setSize(Long size) Sets the size of the file. The size attribute is applicable only to files. |
Parameters
Name | Description |
|---|---|
size | File size. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getMimeType() Obtains the MIME type of the file or folder. |
Returns
Type | Description |
|---|---|
String | MIME type of the file or folder. |
Method |
|---|
public File setMimeType(String mimeType) Sets the MIME type of the file or folder. |
Parameters
Name | Description |
|---|---|
mimeType | MIME type of the file or folder. For details, see the MIME type of the HTTP transmission protocol. Note: The value of mimeType is always application/vnd.huawei.apps.folder for a folder. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public List<String> getParentFolder() Obtains the parent folder ID of the file. |
Returns
Type | Description |
|---|---|
List<String> | IDs of the parent folders of the file. |
Method |
|---|
public File setParentFolder(List<String> parentFolder) Sets the parent folder ID of the file. |
Parameters
Name | Description |
|---|---|
parentFolder | IDs of the parent folders of the file. The list structure is retained to ensure API compatibility. Only the first ID in the list is processed. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public DateTime getCreatedTime() Obtains the time when the file or folder is created, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
DateTime | Time when the file or folder is created, in RFC 3339 date-time format. |
Method |
|---|
public File setCreatedTime(DateTime createdTime) Sets the time when the file or folder is created, in RFC 3339 date-time format. |
Parameters
Name | Description |
|---|---|
createdTime | Time when the file or folder is created, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public DateTime getEditedTime() Obtains the last time when the file or folder is modified, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
DateTime | Last modification time of the file or folder, in RFC 3339 date-time format. |
Method |
|---|
public File setEditedTime(DateTime editedTime) Sets the last time when the file or folder is modified, in RFC 3339 date-time format. |
Parameters
Name | Description |
|---|---|
editedTime | Last modification time of the file or folder, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getDescription() Obtains the short description of the file or folder. |
Returns
Type | Description |
|---|---|
String | Short description of the file or folder. |
Method |
|---|
public File setDescription(String description) Sets the short description of the file or folder. |
Parameters
Name | Description |
|---|---|
description | Short description of the file or folder. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public List<User> getOwners() Obtains the users to whom the file or folder belongs. |
Returns
Type | Description |
|---|---|
List<User> | Users to whom the file or folder belongs. |
Method |
|---|
public File setOwners(List<User> owners) Sets the users to whom the file or folder belongs. |
Parameters
Name | Description |
|---|---|
owners | Users to whom the file or folder belongs. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getFavorite() Checks whether the file or folder is marked. |
Returns
Type | Description |
|---|---|
Boolean | Sets whether the file or folder is marked. |
Method |
|---|
public File setFavorite(Boolean favorite) Sets whether the file or folder is marked. |
Parameters
Name | Description |
|---|---|
favorite | Indicates whether the file or folder is marked. true if the file or folder is marked; false otherwise. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getRecycled() Checks whether the file or folder has been moved to the recycle bin. |
Returns
Type | Description |
|---|---|
Boolean | Indicates whether the file or folder has been moved to the recycle bin. |
Method |
|---|
public File setRecycled(Boolean recycled) Sets whether the file or folder has been moved to the recycle bin. |
Parameters
Name | Description |
|---|---|
recycled | Indicates whether the file or folder has been moved to the recycle bin.
Note: Only the owner has the permission to perform this operation. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Map<String, String> getAppSettings() Obtains custom file attributes that are private to the requesting app. |
Returns
Type | Description |
|---|---|
Map<String, String> | Custom file attributes. |
Method |
|---|
public File setAppSettings(Map<String, String> appSettings) Sets custom file attributes that are private to the requesting app. |
Parameters
Name | Description |
|---|---|
appSettings | Custom file attributes. The value is a collection of key-value pairs that are private to the requesting app. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Map<String, String> getProperties() Obtains custom file attributes that are visible to all apps. |
Returns
Type | Description |
|---|---|
Map<String, String> | Custom file attributes. |
Method |
|---|
public File setProperties(Map<String, String> properties) Sets custom file attributes that are visible to all apps. |
Parameters
Name | Description |
|---|---|
properties | Custom file attributes. The value is a collection of key-value pairs that are visible to all apps. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public File.Capabilities getCapabilities() Obtains the current user's permissions for the file. Each permission corresponds to an action that can be taken by the user. |
Returns
Type | Description |
|---|---|
File.Capabilities | A File.Capabilities object. |
Method |
|---|
public File setCapabilities(Capabilities capabilities) Sets the current user's permissions for the file. |
Parameters
Name | Description |
|---|---|
capabilities | Current user's permissions for the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public File.ContentExtras getContentExtras() Obtains additional information about file content. The additional information is optional and is not contained in the response. |
Returns
Type | Description |
|---|---|
File.ContentExtras | A File.ContentExtras object. |
Method |
|---|
public File setContentExtras(ContentExtras contentExtras) Sets additional information about file content. |
Parameters
Name | Description |
|---|---|
contentExtras | Additional information about file content. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getWriterHasCopyPermission() Checks whether readers and commenters of the file have the copy, print, and download permissions for the file. |
Returns
Type | Description |
|---|---|
Boolean | Whether readers and commenters of the file have the copy, print, and download permissions for the file.
|
Method |
|---|
public File setWriterHasCopyPermission(Boolean writerHasCopyPermission) Sets whether readers and commenters of the file have the copy, print, and download permissions for the file. |
Parameters
Name | Description |
|---|---|
writerHasCopyPermission | Indicates whether readers and commenters of the file have the copy, print, and download permissions for the file.
|
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getDirectlyRecycled() Checks whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. |
Returns
Type | Description |
|---|---|
Boolean | Whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively.
|
Method |
|---|
public File setDirectlyRecycled(Boolean directlyRecycled) Sets whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. |
Parameters
Name | Description |
|---|---|
directlyRecycled | Indicates whether the file has been explicitly moved to the recycle bin. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getFileSuffix() Obtains the final component of the full file name suffix. Full file name suffixes apply only to files with binary content in HUAWEI Drive Kit. |
Returns
Type | Description |
|---|---|
String | Final component of the full file name suffix. |
Method |
|---|
public File setFileSuffix(String fileSuffix) Sets the final component of the full file name suffix. Full file name suffixes apply only to files with binary content in HUAWEI Drive Kit. |
Parameters
Name | Description |
|---|---|
fileSuffix | Final component of the full file name suffix. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getFullFileSuffix() Obtains the full file name suffix extracted from the name field. The full file name suffix may contain multiple concatenated suffixes, for example, tar.gz. Full file name suffixes apply only to files with binary content in HUAWEI Drive Kit. When the value of name changes, the full file name suffix automatically changes. If the new file name does not contain a valid file name suffix, the original full file name suffix is retained. |
Returns
Type | Description |
|---|---|
String | Full file name suffix. The full file name suffix may contain multiple concatenated suffixes, for example, tar.gz. |
Method |
|---|
public File setFullFileSuffix(String fullFileSuffix) Sets the full file name suffix extracted from the name field. The full file name suffix may contain multiple concatenated suffixes, for example, tar.gz. When the value of name changes, the full file name suffix automatically changes. If the new file name does not contain a valid file name suffix, the original full file name suffix is retained. |
Parameters
Name | Description |
|---|---|
fullfileSuffix | Full file name suffix extracted from the name field. The full file name suffix may contain multiple concatenated suffixes, for example, tar.gz. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getExistThumbnail() Checks whether the file has a thumbnail. |
Returns
Type | Description |
|---|---|
Boolean | Whether the file has a thumbnail.
|
Method |
|---|
public File setExistThumbnail(Boolean existThumbnail) Sets whether the file has a thumbnail. |
Parameters
Name | Description |
|---|---|
existThumbnail | Indicates whether the file has a thumbnail. The value is a Boolean value. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getIconDownloadLink() Obtains the link to the static unauthorized icon of the file. |
Returns
Type | Description |
|---|---|
String | Link to the static unauthorized icon of the file. |
Method |
|---|
public File setIconDownloadLink(String iconDownloadLink) Sets the link to the icon of the file. |
Parameters
Name | Description |
|---|---|
iconDownloadLink | Link to the icon of the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public File.PictureMetadata getPictureMetadata() Obtains the additional metadata of a media file. |
Returns
Type | Description |
|---|---|
File.PictureMetadata | Additional metadata of a media file. |
Method |
|---|
public File setPictureMetadata(PictureMetadata pictureMetadata) Sets the additional metadata of a media file. |
Parameters
Name | Description |
|---|---|
pictureMetadata | Additional metadata of a media file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getIsAppAuthorized() Checks whether the file is created or opened by the requesting app. |
Returns
Type | Description |
|---|---|
Boolean | Whether the file is created or opened by the requesting app.
|
Method |
|---|
public File setIsAppAuthorized(Boolean isAppAuthorized) Sets whether the file is created or opened by the requesting app. |
Parameters
Name | Description |
|---|---|
isAppAuthorized | Indicates whether the file is created or opened by the requesting app.
|
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public User getLastEditor() Obtains information about the last user who modifies the file. |
Returns
Type | Description |
|---|---|
User | Information about the last user who modifies the file. |
Method |
|---|
public File setLastEditor(User lastEditor) Sets information about the last user who modifies the file. |
Parameters
Name | Description |
|---|---|
lastEditor | Information about the last user who modifies the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getEditedByMe() Checks whether the file is modified by the current user. |
Returns
Type | Description |
|---|---|
Boolean | Whether the file is modified by the current user.
|
Method |
|---|
public File setEditedByMe(Boolean editedByMe) Sets whether the file is modified by the current user. |
Parameters
Name | Description |
|---|---|
editedByMe | Indicates whether the file is modified by the current user.
|
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public DateTime getEditedByMeTime() Obtains the last time when the file is modified by the current user, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
DateTime | Last time when the file was modified by the current user, in RFC 3339 date-time format. |
Method |
|---|
public File setEditedByMeTime(DateTime editedByMeTime) Sets the last time when the file is modified by the current user, in RFC 3339 date-time format. |
Parameters
Name | Description |
|---|---|
editedByMeTime | Last time when the file was modified by the current user, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getOwnedByMe() Checks whether the user owns the file. |
Returns
Type | Description |
|---|---|
Boolean | Whether the user owns the file. |
Method |
|---|
public File setOwnedByMe(Boolean ownedByMe) Sets whether the user owns the file. |
Parameters
Name | Description |
|---|---|
ownedByMe | Indicates whether the user owns the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public List<String> getPermissionIds() Obtains the IDs of permissions for users to access the file. |
Returns
Type | Description |
|---|---|
List<String> | IDs of permissions for users to access the file. |
Method |
|---|
public File setPermissionIds(List<String> permissionIds) Sets the IDs of permissions for users to access the file. |
Parameters
Name | Description |
|---|---|
permissionIds | IDs of permissions for users to access the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public List<Permission> getPermissions() Obtains the list of all permissions for the file. |
Returns
Type | Description |
|---|---|
List<Permission> | List of permissions for the file. |
Method |
|---|
public File setPermissions(List<Permission> permissions) Sets the list of all permissions for the file. Only the user who shares the file has the permissions, and users who access the file on the drive do not. |
Parameters
Name | Description |
|---|---|
permissions | All permissions for the file. Only the user who shares the file has the permissions, and users who access the file on the drive do not. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Long getOccupiedSpace() Obtains the storage space occupied by the file. |
Returns
Type | Description |
|---|---|
Long | Storage space occupied by the file. |
Method |
|---|
public File setOccupiedSpace(Long occupiedSpace) Sets the storage space occupied by the file. |
Parameters
Name | Description |
|---|---|
occupiedSpace | Storage space occupied by the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getSha256() Obtains the SHA-256 value for verifying the file. |
Returns
Type | Description |
|---|---|
String | SHA-256 value for verifying the file. |
Method |
|---|
public File setSha256(String sha256) Sets the SHA-256 value for verifying the file. |
Parameters
Name | Description |
|---|---|
sha256 | SHA-256 value for verifying the file. This parameter may not be set on the client. If it is set, the server will use the SHA-256 value for verifying the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getHasShared() Checks whether the file is shared. |
Returns
Type | Description |
|---|---|
Boolean | Whether the file is shared. |
Method |
|---|
public File setHasShared(Boolean hasShared) Sets whether the file is shared. |
Parameters
Name | Description |
|---|---|
hasShared | Indicates whether the file is shared. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public DateTime getSharedWithMeTime() Obtains the time when the file is shared by a user, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
DateTime | Time when the file is shared by a user, in RFC 3339 date-time format. |
Method |
|---|
public File setSharedWithMeTime(DateTime sharedWithMeTime) Sets the time when the file is shared by a user, in RFC 3339 date-time format. |
Parameters
Name | Description |
|---|---|
sharedWithMeTime | Time when the file is shared by a user, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public User getSharer() Obtains the user who shares the file. |
Returns
Type | Description |
|---|---|
User | User who shares the file. |
Method |
|---|
public File setSharer(User sharer) Sets the user who shares the file. |
Parameters
Name | Description |
|---|---|
sharer | User who shares the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public List<String> getContainers() Obtains the types of space that may contain the file. |
Returns
Type | Description |
|---|---|
List<String> | Types of space that may contain the file. |
Method |
|---|
public File setContainers(List<String> containers) Sets the types of space that may contain the file. The options include drive and applicationData. |
Parameters
Name | Description |
|---|---|
containers | Types of space that may contain the file. The options include drive and applicationData. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getThumbnailDownloadLink() Obtains the link to the thumbnail of the file. |
Returns
Type | Description |
|---|---|
String | Link to the thumbnail of the file. A 0-KB file does not have a thumbnail. |
Method |
|---|
public File setThumbnailDownloadLink(String thumbnailDownloadLink) Sets the link to the thumbnail of the file. The link is set only when the requesting app has the permission to access the file content. |
Parameters
Name | Description |
|---|---|
thumbnailDownloadLink | Link to the thumbnail of the file. The link is set only when the requesting app has the permission to access the file content. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getSmallThumbnailDownloadLink() Obtains the link to the small thumbnail of the file. |
Returns
Type | Description |
|---|---|
String | Link to the small thumbnail of the file. |
Method |
|---|
public File setSmallThumbnailDownloadLink(String smallThumbnailDownloadLink) Sets the link to the small thumbnail of the file. The link is set only when the requesting app has the permission to access the file content. |
Parameters
Name | Description |
|---|---|
smallThumbnailDownloadLink | Link to the small thumbnail of the file. The link is set only when the requesting app has the permission to access the file content. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public DateTime getRecycledTime() Obtains the time when a file is moved to the recycle bin, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
DateTime | Time when a file is moved to the recycle bin, in RFC 3339 date-time format. |
Method |
|---|
public File setRecycledTime(DateTime recycledTime) Sets the time when a file is moved to the recycle bin, in RFC 3339 date-time format. |
Parameters
Name | Description |
|---|---|
recycledTime | Time when a file is moved to the recycle bin, in RFC 3339 date-time format. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public User getRecyclingUser() Obtains the user who moves the file to the recycle bin. |
Returns
Type | Description |
|---|---|
User | User who moves the file to the recycle bin. |
Method |
|---|
public File setRecyclingUser(User recyclingUser) Sets the user who moves the file to the recycle bin. |
Parameters
Name | Description |
|---|---|
recyclingUser | User who moves the file to the recycle bin. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public File.VideoMetadata getVideoMetadata() Obtains additional video media metadata. |
Returns
Type | Description |
|---|---|
File.VideoMetadata | Additional video media metadata. |
Method |
|---|
public File setVideoMetadata(File.VideoMetadata videoMetadata) Sets additional video media metadata. |
Parameters
Name | Description |
|---|---|
videoMetadata | Additional video media metadata. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getContentDownloadLink() Obtains the link for downloading the file in a browser. |
Returns
Type | Description |
|---|---|
String | Link for downloading the file in a browser. |
Method |
|---|
public File setContentDownloadLink(String contentDownloadLink) Sets the link for downloading the file in a browser. |
Parameters
Name | Description |
|---|---|
contentDownloadLink | Link for downloading the file in a browser. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Boolean getWritersHasSharePermission() Checks whether a user who has only the write permission for the file can modify the file. |
Returns
Type | Description |
|---|---|
Boolean | Whether a user who has only the write permission for the file can modify the file. |
Method |
|---|
public File setWritersHasSharePermission(Boolean writersHasSharePermission) Sets whether a user who has only the write permission for the file can modify the file. |
Parameters
Name | Description |
|---|---|
writersHasSharePermission | Whether a user who has only the write permission for the file can modify the file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getContentVersion() Obtains the version number of the entity file content. |
Returns
Type | Description |
|---|---|
String | Version number of the entity file content. |
Method |
|---|
public File setContentVersion(String contentVersion) Sets the version number of the entity file content. |
Parameters
Name | Description |
|---|---|
contentVersion | Version number of the entity file content. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getLastHistoryVersionId() Obtains the latest file version ID. |
Returns
Type | Description |
|---|---|
String | Latest file version ID. |
Method |
|---|
public File setLastHistoryVersionId(String lastHistoryVersionId) Sets the latest file version ID. |
Parameters
Name | Description |
|---|---|
lastHistoryVersionId | Latest file version ID. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getOriginalFilename() Obtains the original file name. |
Returns
Type | Description |
|---|---|
String | Original file name. |
Method |
|---|
public File setOriginalFilename(String originalFilename) Sets the original file name. |
Parameters
Name | Description |
|---|---|
originalFilename | Original file name. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Long getThumbnailVersion() Obtains the thumbnail version number. |
Returns
Type | Description |
|---|---|
Long | Thumbnail version number. |
Method |
|---|
public File setThumbnailVersion(Long thumbnailVersion) Sets the thumbnail version number. |
Parameters
Name | Description |
|---|---|
thumbnailVersion | Thumbnail version number. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public Long getVersion() Obtains the increasing version number of a file. |
Returns
Type | Description |
|---|---|
Long | Increasing version number of a file. |
Method |
|---|
public File setVersion(Long version) Sets the increasing version number of a file. |
Parameters
Name | Description |
|---|---|
version | Increasing version number of a file. |
Returns
Type | Description |
|---|---|
File | A File object. |
Method |
|---|
public String getOnLineViewLink() Obtains the link to preview files online in a browser. |
Returns
Type | Description |
|---|---|
String | Link to preview files online in a browser. |
Method |
|---|
public File setOnLineViewLink(String onLineViewLink) Sets the link to preview files online in a browser. |
Parameters
Name | Description |
|---|---|
onLineViewLink | Link to preview files online in a browser. |
Returns
Type | Description |
|---|---|
File | A File object. |