| Class info |
| public final class File extends GenericJson |
| File metadata class. |
| Type | Name | Desc |
| static final Class | File.Capabilities | 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 | File.ContentExtras | 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 | File.PictureMetadata | Declaration of the File.PictureMetadata class, a class of additional metadata of media files. |
| static final Class | File.VideoMetadata | Declaration of the File.VideoMetadata class, a class of additional video media metadata. |
| Constructor name |
| File() Constructor for the File class. |
| Return type | Method name |
| String | getCategory() Obtains the resource type, which is always drive#file. |
| File | setCategory (String category) Sets the resource type, which is always drive#file. |
| String | getId() Obtains the ID of the file or folder. |
| File | setId(String id) Sets the ID of the file or folder. |
| String | getFileName() Obtains the name of the file or folder. |
| File | setFileName(String fileName) Sets the name of the file or folder. |
| Long | getSize() Obtains the size of the file. The size attribute is applicable only to files. |
| File | setSize(Long size) Sets the size of the file. The size attribute is applicable only to files. |
| String | getMimeType() Obtains the MIME type of the file or folder. |
| File | setMimeType(String mimeType) Sets the MIME type of the file or folder. |
| List<String> | getParentFolder() Obtains the IDs of the parent folders of the file. |
| File | setParentFolder(List<String> parentFolder) Sets the IDs of the parent folders of the file. |
| com.huawei.cloud.base.util.DateTime | getCreatedTime() Obtains the creation time of the file or folder. |
| File | setCreatedTime(com.huawei.cloud.base.util.DateTime createdTime) Sets the creation time of the file or folder. |
| com.huawei.cloud.base.util.DateTime | getEditedTime() Obtains the last modification time of the file or folder. |
| File | setEditedTime (com.huawei.cloud.base.util.DateTime editedTime) Sets the last modification time of the file or folder. |
| String | getDescription() Obtains the short description of the file or folder. |
| File | setDescription(String description) Sets the short description of the file or folder. |
| List<User> | getOwners() Obtains the users to whom the file or folder belongs. |
| File | setOwners(List<User> owners) Sets the users to whom the file or folder belongs. |
| Boolean | getFavorite() Checks whether the file or folder is marked. |
| File | setFavorite(Boolean favorite) Sets whether the file or folder is marked. |
| Boolean | getRecycled() Checks whether the file or folder has been moved to the recycle bin. |
| File | setRecycled (Boolean recycled) Sets whether the file or folder has been moved to the recycle bin. |
| Map<String, String> | getAppSettings() Obtains custom file attributes that are private to the requesting app. |
| File | setAppSettings(Map<String, String> appSettings) Sets custom file attributes that are private to the requesting app. |
| Map<String, String> | getProperties() Obtains custom file attributes that are visible to all apps. |
| File | setProperties(Map<String, String> properties) Sets custom file attributes that are visible to all apps. |
| File | set(String fieldName, Object value) Sets the given field value for the given field name. |
| File | clone() Clones a File object. |
| 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. |
| File.ContentExtras | getContentExtras() Obtains additional information about file content. |
| Boolean | getWriterHasCopyPermission() Checks whether readers and commenters of the file have the copy, print, and download permissions for the file. |
| Boolean | getDirectlyRecycled() Checks whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. |
| 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. |
| String | getFullFileSuffix() Obtains the full file name suffix extracted from the fileName 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. |
| Boolean | getExistThumbnail() Checks whether the file has a thumbnail. |
| String | getIconDownloadLink() Obtains the link to the icon of the file. |
| File.PictureMetadata | getPictureMetadata() Obtains additional metadata of a media file. |
| Boolean | getIsAppAuthorized() Checks whether the file is created or opened by the requesting app. |
| User | getLastEditor() Obtains information about the last user who modifies the file. |
| Boolean | getEditedByMe() Checks whether the file is modified by the current user. |
| com.huawei.cloud.base.util.DateTime | getEditedByMeTime() Obtains the last time when the file was modified by the current user. |
| Boolean | getOwnedByMe() Checks whether the current user owns the file. |
| List<String> | getPermissionIds() Obtains the IDs of permissions for users to access the file. |
| List<Permission> | getPermissions() 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. |
| Long | getOccupiedSpace() Obtains the storage space occupied by the file. |
| String | getSha256() Obtains the SHA-256 value for verifying the file. |
| Boolean | getHasShared() Checks whether the file is shared. |
| com.huawei.cloud.base.util.DateTime | getSharedWithMeTime() Obtains the time when the file is shared by a user, RFC 3339 date-time. |
| User | getSharer() Obtains the user who shares the file. |
| List<String> | getContainers() Obtains the types of space that may contain the file. The options are drive and applicationData. |
| String | getThumbnailDownloadLink() Obtains the link to the thumbnail of the file. |
| com.huawei.cloud.base.util.DateTime | getRecycledTime() Obtains the time when the file is moved to the recycle bin, RFC 3339 date-time. |
| User | getRecyclingUser() Obtains the user who moves the file to the recycle bin. |
| File.VideoMetadata | getVideoMetadata() Obtains additional video metadata. |
| String | getContentDownloadLink() Obtains the link for downloading the file in a browser. |
| Boolean | getWritersHasSharePermission() Checks whether a user who has only the write permission for the file can modify the permission of the file. |
| File | 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. |
| File | setContentExtras(ContentExtras contentExtras) Sets additional information about file content. |
| File | setWriterHasCopyPermission(Boolean writerHasCopyPermission) Sets whether readers and commenters of the file have the copy, print, and download permissions for the file. |
| File | setDirectlyRecycled(Boolean directlyRecycled) Sets whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. |
| 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. |
| File | setFullFileSuffix(String fullFileSuffix) Sets the full file name suffix extracted from the fileName 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. |
| File | setExistThumbnail(Boolean existThumbnail) Sets whether the file has a thumbnail. |
| File | setIconDownloadLink(String iconDownloadLink) Sets the link to the icon of the file. |
| File | setPictureMetadata(PictureMetadata pictureMetadata) Sets additional metadata of a media file. |
| File | setIsAppAuthorized(Boolean isAppAuthorized) Sets whether the file is created or opened by the requesting app. |
| File | setLastEditor(User lastEditor) Sets information about the last user who modifies the file. |
| File | setEditedByMe(Boolean editedByMe) Sets whether the file is modified by the current user. |
| File | setEditedByMeTime(com.huawei.cloud.base.util.DateTime editedByMeTime) Sets the last time when the file was modified by the current user. |
| File | setOwnedByMe(Boolean ownedByMe) Sets whether the current user owns the file. |
| File | setPermissionIds(List<String> permissionIds) Sets the IDs of permissions for users to access the file. |
| File | setPermissions(List<Permission> permissions) Sets the list of all permissions for the file. |
| File | setOccupiedSpace(Long occupiedSpace) Sets the storage space occupied by the file, in bytes. |
| File | setSha256(String sha256) Sets the SHA-256 value for verifying the file. |
| File | setHasShared(Boolean hasShared) Sets whether the file is shared. |
| File | setSharedWithMeTime(com.huawei.cloud.base.util.DateTime sharedWithMeTime) Sets the time when the file is shared by a user, RFC 3339 date-time. |
| File | setSharer(User sharer) Sets the user who shares the file. |
| File | setContainers(List<String> containers) Sets the types of space that may contain the file. |
| 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. |
| File | setRecycledTime(com.huawei.cloud.base.util.DateTime recycledTime) Sets the time when the file is moved to the recycle bin, RFC 3339 date-time. |
| File | setRecyclingUser(User recyclingUser) Sets the user who moves the file to the recycle bin. |
| File | setVideoMetadata(File.VideoMetadata videoMetadata) Sets additional video metadata. |
| File | setContentDownloadLink(String contentDownloadLink) Sets the link for downloading the file in a browser. |
| File | setWritersHasSharePermission(Boolean writersHasSharePermission) Sets whether a user who has only the write permission for the file can modify the permission of the file. |
| String | getContentVersion() Obtains the entity file content version number. |
| File | setContentVersion(String contentVersion) Sets the entity file content version number. |
| String | getSignedDownloadLink() Obtains the download link of a file played online. |
| File | setSignedDownloadLink(String signedDownloadLink) Sets the download link of a file played online. |
| String | getLastHistoryVersionId() Obtains the latest file version ID. |
| String | getOriginalFilename() Obtains the original file name. |
| Long | getThumbnailVersion() Obtains the thumbnail version number. |
| Long | getVersion() Obtains the increasing version number of a file. |
| String | getOnLineViewLink() Obtains the link for opening a file online in the browser. |
| File | setLastHistoryVersionId(String lastHistoryVersionId) Sets the latest file version ID. |
| File | setOriginalFilename(String originalFilename) Sets the original file name. |
| File | setThumbnailVersion(Long thumbnailVersion) Sets the thumbnail version number. |
| File | setVersion(Long version) Sets the increasing version number of a file. |
| File | setOnLineViewLink(String onLineViewLink) Sets the link for opening a file online in the browser. |
| constructor |
| File() |
| Constructs a File object. |
| Method |
| public String getCategory() |
| Obtains the resource type, which is always drive#file. |
Return
| type | desc |
| String | Resource type, which is always drive#file. |
| Method |
| public File setCategory(String category) |
| Sets the resource type, which is always drive#file. |
Parameters
| Parameter name | Parameter desc |
| category | Resource type, which is always drive#file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getId() |
| Obtains the unique ID of the file or folder. |
Return
| type | desc |
| String | Unique ID of the file or folder. |
| Method |
| public File setId(String id) |
| Sets the unique ID of the file or folder. |
Parameters
| Parameter name | Parameter desc |
| id | Unique ID of the file or folder. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getFileName () |
| Obtains the name of the file or folder. |
Return
| type | desc |
| String | File or folder name. |
| Method |
| public File setFileName(String fileName) |
| Sets the name of the file or folder. |
Parameters
| Parameter name | Parameter desc |
| fileName | File or folder name, which cannot contain any of the following characters:\ / : ? *“ < > | |
Return
| type | desc |
| File | A File object. |
| Method |
| public Long getSize() |
| Obtains the size of the file. The size attribute is applicable only to files. |
Return
| type | desc |
| Long | File size. |
| Method |
| public File setSize(Long size) |
| Sets the size of the file. The size attribute is applicable only to files. |
Parameters
| Parameter name | Parameter desc |
| size | File size. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getMimeType () |
| Obtains the MIME type of the file or folder. |
Return
| type | desc |
| String | MIME type of the file or folder. |
| Method |
| public File setMimeType(String mimeType) |
| Sets the MIME type of the file or folder. |
Parameters
| Parameter name | Parameter desc |
| 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. |
Return
| type | desc |
| File | A File object. |
| Method |
| public List<String> getParentFolder() |
| Obtains the IDs of the parent folders of the file. |
Return
| type | desc |
| List<String> | IDs of the parent folders of the file. |
| Method |
| public File setParentFolder(List<String> parentFolder) |
| Sets the IDs of the parent folders of the file. |
Parameters
| Parameter name | Parameter desc |
| 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. |
Return
| type | desc |
| File | A File object. |
| Method |
| public com.huawei.cloud.base.util.DateTime getCreatedTime() |
| Obtains the creation time of the file or folder, in RFC 3339 date-time format. |
Return
| type | desc |
| com.huawei.cloud.base.util.DateTime | Creation time of the file or folder. |
| Method |
| public File setCreatedTime(com.huawei.cloud.base.util.DateTime createdTime) |
| Sets the creation time of the file or folder, in RFC 3339 date-time format. |
Parameters
| Parameter name | Parameter desc |
| createdTime | Creation time of the file or folder, in RFC 3339 date-time format. |
Return
| type | desc |
| File | A File object. |
| Method |
| public com.huawei.cloud.base.util.DateTime getEditedTime() |
| Obtains the last modification time of the file or folder, in RFC 3339 date-time format. |
Return
| type | desc |
| com.huawei.cloud.base.util.DateTime | Last modification time of the file or folder, in RFC 3339 date-time format. |
| Method |
| public File setEditedTime (com.huawei.cloud.base.util.DateTime editedTime) |
| Sets the last modification time of the file or folder, in RFC 3339 date-time format. |
Parameters
| Parameter name | Parameter desc |
| editedTime | Last modification time of the file or folder, in RFC 3339 date-time format. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getDescription() |
| Obtains the short description of the file or folder. |
Return
| type | desc |
| String | Short description of the file or folder. |
| Method |
| public File setDescription(String description) |
| Sets the short description of the file or folder. |
Parameters
| Parameter name | Parameter desc |
| description | Short description of the file or folder. |
Return
| type | desc |
| File | A File object. |
| Method |
| public List<User> getOwners() |
| Obtains the users to whom the file or folder belongs. |
Return
| type | desc |
| 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
| Parameter name | Parameter desc |
| owners | Users to whom the file or folder belongs. |
Return
| type | desc |
| File | A File object. |
| Method |
| public Boolean getFavorite() |
| Checks whether the file or folder is marked. |
Return
| type | desc |
| Boolean | Whether the file or folder is marked. |
| Method |
| public File setFavorite(Boolean favorite) |
| Sets whether the file or folder is marked. |
Parameters
| Parameter name | Parameter desc |
| favorite | Indicates whether the file or folder is marked. The value true indicates that the file or folder is marked and the value false indicates not. |
Return
| type | desc |
| File | A File object. |
| Method |
| public Boolean getRecycled() |
| Checks whether the file or folder has been moved to the recycle bin. |
Return
| type | desc |
| Boolean | 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
| Parameter name | Parameter desc |
| recycled | Indicates whether the file or folder has been moved to the recycle bin. true: The file or folder has been moved to the recycle bin. false: The file or folder has not been moved to the recycle bin. Note: Only the owner of a file can set this parameter for the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public Map<String,String> getAppSettings() |
| Obtains custom file attributes that are private to the requesting app. |
Return
| type | desc |
| 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
| Parameter name | Parameter desc |
| appSettings | Custom file attributes. The value is a collection of key-value pairs that are private to the requesting app. |
Return
| type | desc |
| File | A File object. |
| Method |
| public Map<String,String> getProperties() |
| Obtains custom file attributes that are visible to all apps. |
Return
| type | desc |
| 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
| Parameter name | Parameter desc |
| properties | Custom file attributes. The value is a collection of key-value pairs that are visible to all apps. |
Return
| type | desc |
| File | A File object. |
| Method |
public File set(String fieldName, Object value) |
| Sets the given field value for the given field name. |
Parameters
| Parameter name | Parameter desc |
| fieldName | Field name. |
| value | Field value. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File clone () |
| Clones a File object. |
Return
| type | desc |
| 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. |
Return
| type | desc |
| File.Capabilities | A File.Capabilities object. |
| Method |
| public File.ContentExtras getContentExtras() |
| Obtains additional information about file content. The additional information is optional and is not contained in the response. |
Return
| type | desc |
| File.ContentExtras | A File.ContentExtras object. |
| Method |
| public Boolean getWriterHasCopyPermission() |
| Checks whether readers and commenters of the file have the copy, print, and download permissions for the file. |
Return
| type | desc |
| Boolean | Whether readers and commenters of the file have the copy, print, and download permissions for the file. true: Readers and commenters do not have the permissions. false: Readers and commenters have the permissions. null: Whether readers and commenters have the permissions is not set. |
| Method |
| public Boolean getDirectlyRecycled() |
| Checks whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. |
Return
| type | desc |
| Boolean | Whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively. true: The file is directly moved to the recycle bin. false: The file is deleted from its parent folder recursively. null: Whether the file is directly moved to the recycle bin is not set. |
| 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. |
Return
| type | desc |
| String | Final component of the full file name suffix. |
| Method |
| public String getFullFileSuffix() |
| Obtains the full file name suffix extracted from the fileName 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. |
Return
| type | desc |
| String | Full file name suffix, which may contain multiple concatenated suffixes, for example, tar.gz. |
| Method |
| public Boolean getExistThumbnail() |
| Checks whether the file has a thumbnail. |
Return
| type | desc |
| Boolean | Whether the file has a thumbnail. true: The file has a thumbnail. false: The file does not have a thumbnail. |
| Method |
| public String getIconDownloadLink() |
| Obtains the link to the static unauthorized icon of the file. |
Return
| type | desc |
| String | Link to the static unauthorized icon of the file. |
| Method |
| public File.PictureMetadata getPictureMetadata() |
| Obtains additional metadata of a media file. |
Return
| type | desc |
| File.PictureMetadata | Additional metadata of a media file. |
| Method |
| public Boolean getIsAppAuthorized() |
| Checks whether the file is created or opened by the requesting app. |
Return
| type | desc |
| Boolean | Whether the file is created or opened by the requesting app. true: The file is created or opened by the requesting app. false: The file is not created or opened by the requesting app. |
| Method |
| public User getLastEditor() |
| Obtains information about the last user who modifies the file. |
Return
| type | desc |
| User | Information about the last user who modifies the file. |
| Method |
| public Boolean getEditedByMe() |
| Checks whether the file is modified by the current user. |
Return
| type | desc |
| Boolean | Whether the file is modified by the current user. true: The file is modified by the current user. false: The file is not modified by the current user. |
| Method |
| public com.huawei.cloud.base.util.DateTime getEditedByMeTime() |
| Obtains the last time when the file was modified by the current user. |
Return
| type | desc |
| com.huawei.cloud.base.util.DateTime | Last time when the file was modified by the current user. |
| Method |
| public Boolean getOwnedByMe() |
| Checks whether the current user owns the file. |
Return
| type | desc |
| Boolean | Whether the current user owns the file. |
| Method |
| public List<String> getPermissionIds() |
| Obtains the IDs of permissions for users to access the file. |
Return
| type | desc |
| List<String> | IDs of permissions for users to access the file. |
| Method |
| public List<Permission> getPermissions() |
| Obtains the list of all permissions for the file. |
Return
| type | desc |
| List<Permission> | List of all permissions for the file. |
| Method |
| public Long getOccupiedSpace() |
| Obtains the storage space occupied by the file, in bytes. |
Return
| type | desc |
| Long | Storage space occupied by the file, in bytes. |
| Method |
| public String getSha256() |
| Obtains the SHA-256 value for verifying the file. |
Return
| type | desc |
| String | SHA-256 value for verifying the file. |
| Method |
| public Boolean getHasShared() |
| Checks whether the file is shared. |
Return
| type | desc |
| Boolean | Whether the file is shared. |
| Method |
| public com.huawei.cloud.base.util.DateTime getSharedWithMeTime() |
| Obtains the time when the file is shared by a user, RFC 3339 date-time. |
Return
| type | desc |
| com.huawei.cloud.base.util.DateTime | Time when the file is shared by a user, RFC 3339 date-time. |
| Method |
| public User getSharer() |
| Obtains the user who shares the file. |
Return
| type | desc |
| User | User who shares the file. |
| Method |
| public List<String> getContainers() |
| Obtains the types of space that may contain the file. |
Return
| type | desc |
| List<String> | Types of space that may contain the file. |
| Method |
| public String getThumbnailDownloadLink() |
| Obtains the link to the thumbnail of the file. |
Return
| type | desc |
| String | Link to the thumbnail of the file. |
| Method |
| public com.huawei.cloud.base.util.DateTime getRecycledTime() |
| Obtains the time when the file is moved to the recycle bin, RFC 3339 date-time. |
Return
| type | desc |
| com.huawei.cloud.base.util.DateTime | Time when the file is moved to the recycle bin, RFC 3339 date-time. |
| Method |
| public User getRecyclingUser() |
| Obtains the user who moves the file to the recycle bin. |
Return
| type | desc |
| User | User who moves the file to the recycle bin. |
| Method |
| public File.VideoMetadata getVideoMetadata() |
| Obtains additional video metadata. |
Return
| type | desc |
| File.VideoMetadata | Additional video metadata. |
| Method |
| public String getContentDownloadLink() |
| Obtains the link for downloading the file in a browser. |
Return
| type | desc |
| String | Link for downloading the file in a browser. |
| Method |
| public Boolean getWritersHasSharePermission() |
| Checks whether a user who has only the write permission for the file can modify the permission of the file. |
Return
| type | desc |
| Boolean | Whether a user who has only the write permission for the file can modify the permission of the file. |
| Method |
| public File setCapabilities(Capabilities capabilities) |
| Sets the current user's permissions for the file. |
Parameters
| Parameter name | Parameter desc |
| capabilities | Current user’s permissions for the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setContentExtras(ContentExtras contentExtras) |
| Sets additional information about file content. |
Parameters
| Parameter name | Parameter desc |
| contentExtras | Additional information about file content. |
Return
| type | desc |
| File | A File object. |
| 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
| Parameter name | Parameter desc |
| writerHasCopyPermission | Indicates whether readers and commenters of the file have the copy, print, and download permissions for the file. true: Readers and commenters of the file do not have the copy, print, and download permissions for the file. false: Readers and commenters of the file have the copy, print, and download permissions for the file. |
Return
| type | desc |
| File | A File object. |
| 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
| Parameter name | Parameter desc |
| directlyRecycled | Indicates whether the file is directly moved to the recycle bin. |
Return
| type | desc |
| File | A File object. |
| 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
| Parameter name | Parameter desc |
| fileSuffix | Final component of the full file name suffix. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setFullFileSuffix(String fullFileSuffix) |
| Sets the full file name suffix extracted from the fileName 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
| Parameter name | Parameter desc |
| fullFileSuffix | Full file name suffix extracted from the name field. The full file name suffix may contain multiple concatenated suffixes, for example, tar.gz. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setExistThumbnail(Boolean existThumbnail) |
| Sets whether the file has a thumbnail. |
Parameters
| Parameter name | Parameter desc |
| existThumbnail | Indicates whether the file has a thumbnail. The value is of the Boolean type. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setIconDownloadLink(String iconDownloadLink) |
| Sets the link to the icon of the file. |
Parameters
| Parameter name | Parameter desc |
| iconDownloadLink | Link to the icon of the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setPictureMetadata(PictureMetadata pictureMetadata) |
| Sets additional metadata of a media file. |
Parameters
| Parameter name | Parameter desc |
| pictureMetadata | Additional metadata of a media file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setIsAppAuthorized(Boolean isAppAuthorized) |
| Sets whether the file is created or opened by the requesting app. |
Parameters
| Parameter name | Parameter desc |
| isAppAuthorized | Indicates whether the file is created or opened by the requesting app. true: The file is created or opened by the requesting app. false: The file is not created or opened by the requesting app. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setLastEditor(User lastEditor) |
| Sets information about the last user who modifies the file. |
Parameters
| Parameter name | Parameter desc |
| lastEditor | Information about the last user who modifies the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setEditedByMe(Boolean editedByMe) |
| Sets whether the file is modified by the current user. |
Parameters
| Parameter name | Parameter desc |
| editedByMe | Indicates whether the file is modified by the current user. true: The file is modified by the current user. false: The file is not modified by the current user. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setEditedByMeTime(com.huawei.cloud.base.util.DateTime editedByMeTime) |
| Sets the last time when the file was modified by the current user. |
Parameters
| Parameter name | Parameter desc |
| editedByMeTime | Last time when the file was modified by the current user. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setOwnedByMe(Boolean ownedByMe) |
| Sets whether the current user owns the file. |
Parameters
| Parameter name | Parameter desc |
| ownedByMe | Indicates whether the current user owns the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setPermissionIds(List<String>permissionIds) |
| Sets the IDs of permissions for users to access the file. |
Parameters
| Parameter name | Parameter desc |
| permissionIds | IDs of permissions for users to access the file. |
Return
| type | desc |
| File | A File object. |
| 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
| Parameter name | Parameter desc |
| 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. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setOccupiedSpace(Long occupiedSpace) |
| Sets the storage space occupied by the file. |
Parameters
| Parameter name | Parameter desc |
| occupiedSpace | Storage space occupied by the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setSha256(String sha256) |
| Sets the SHA-256 value for verifying the file. |
Parameters
| Parameter name | Parameter desc |
| sha256 | SHA-256 value for verifying the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setHasShared(Boolean hasShared) |
| Sets whether the file is shared. |
Parameters
| Parameter name | Parameter desc |
| hasShared | Indicates whether the file is shared. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setSharedWithMeTime(com.huawei.cloud.base.util.DateTime sharedWithMeTime) |
| Sets the time when the file is shared by a user, RFC 3339 date-time. |
Parameters
| Parameter name | Parameter desc |
| sharedWithMeTime | Time when the file is shared by a user, RFC 3339 date-time. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setSharer(User sharer) |
| Sets the user who shares the file. |
Parameters
| Parameter name | Parameter desc |
| sharer | User who shares the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setContainers(List<String> containers) |
| Sets the types of space that may contain the file. The options are drive and applicationData. |
Parameters
| Parameter name | Parameter desc |
| containers | Types of space that may contain the file. The options are drive and applicationData. |
Return
| type | desc |
| File | A File object. |
| 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
| Parameter name | Parameter desc |
| 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. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setRecycledTime(com.huawei.cloud.base.util.DateTime recycledTime) |
| Sets the time when the file is moved to the recycle bin, RFC 3339 date-time. |
Parameters
| Parameter name | Parameter desc |
| recycledTime | Time when the file is moved to the recycle bin, RFC 3339 date-time. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setRecyclingUser(User recyclingUser) |
| Sets the user who moves the file to the recycle bin. |
Parameters
| Parameter name | Parameter desc |
| recyclingUser | User who moves the file to the recycle bin. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setVideoMetadata(File.VideoMetadata videoMetadata) |
| Sets additional video metadata. |
Parameters
| Parameter name | Parameter desc |
| videoMetadata | Additional video metadata. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setContentDownloadLink(String contentDownloadLink) |
| Sets the link for downloading the file in a browser. |
Parameters
| Parameter name | Parameter desc |
| contentDownloadLink | Link for downloading the file in a browser. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setWritersHasSharePermission(Boolean writersHasSharePermission) |
| Sets whether a user who has only the write permission for the file can modify the permission of the file. |
Parameters
| writersHasSharePermission | Parameter desc |
| writersHasSharePermission | Indicates whether a user who has only the write permission for the file can modify the permission of the file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getContentVersion() |
| Obtains the entity file content version number. |
Return
| type | desc |
| String | Entity file content version number. |
| Method |
| public File setContentVersion(String contentVersion) |
| Sets the entity file content version number. |
Parameters
| contentVersion | Parameter desc |
| contentVersion | Entity file content version number. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getSignedDownloadLink() |
| Obtains the download link of a file played online. |
Return
| type | desc |
| String | Download link of a file played online. |
| Method |
| public File setSignedDownloadLink(String signedDownloadLink) |
| Sets the download link of a file played online. |
Parameters
| signedDownloadLink | Parameter desc |
| signedDownloadLink | Download link of a file played online. |
Return
| type | desc |
| File | A File object. |
| Method |
| public String getLastHistoryVersionId() |
| Obtains the latest file version ID. |
Return
| type | desc |
| String | Latest file version ID. |
| Method |
| public String getOriginalFilename() |
| Obtains the original file name. |
Return
| type | desc |
| String | Original file name. |
| Method |
| public Long getThumbnailVersion() |
| Obtains the thumbnail version. |
Return
| type | desc |
| Long | Thumbnail version number. |
| Method |
| public Long getVersion() |
| Obtains the increasing version number of a file. |
Return
| type | desc |
| Long | Increasing version number of a file. |
| Method |
| public String getOnLineViewLink() |
| Obtains the link for opening a file online in the browser. |
Return
| type | desc |
| String | Link for opening a file online in the browser. |
| Method |
| public File setLastHistoryVersionId(String lastHistoryVersionId) |
| Sets the latest file version ID. |
Parameters
| writersHasSharePermission | Parameter desc |
| lastHistoryVersionId | Latest file version ID. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setOriginalFilename(String originalFilename) |
| Sets the original file name. |
Parameters
| originalFilename | Parameter desc |
| originalFilename | Original file name. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setThumbnailVersion(Long thumbnailVersion) |
| Sets the thumbnail version number. |
Parameters
| thumbnailVersion | Parameter desc |
| thumbnailVersion | Thumbnail version number. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setVersion(Long version) |
| Sets the increasing version number of a file. |
Parameters
| version | Parameter desc |
| version | Increasing version number of a file. |
Return
| type | desc |
| File | A File object. |
| Method |
| public File setOnLineViewLink(String onLineViewLink) |
| Sets the link for opening a file online in the browser. |
Parameters
| onLineViewLink | Parameter desc |
| onLineViewLink | Link for opening a file online in the browser. |
Return
| type | desc |
| File | A File object. |