目录

Class info
public final class File extends GenericJson
File metadata class.

Nested Class Summary

TypeNameDesc
static final ClassFile.CapabilitiesDeclaration 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 ClassFile.ContentExtrasDeclaration 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 ClassFile.PictureMetadataDeclaration of the File.PictureMetadata class, a class of additional metadata of media files.
static final ClassFile.VideoMetadataDeclaration of the File.VideoMetadata class, a class of additional video media metadata.

Public Constructor Summary

Constructor name
File()
Constructor for the File class.

Public Method Summary

Return typeMethod name
StringgetCategory()
Obtains the resource type, which is always drive#file.
FilesetCategory (String category)
Sets the resource type, which is always drive#file.
StringgetId()
Obtains the ID of the file or folder.
FilesetId(String id)
Sets the ID of the file or folder.
StringgetFileName()
Obtains the name of the file or folder.
FilesetFileName(String fileName)
Sets the name of the file or folder.
LonggetSize()
Obtains the size of the file. The size attribute is applicable only to files.
FilesetSize(Long size)
Sets the size of the file. The size attribute is applicable only to files.
StringgetMimeType()
Obtains the MIME type of the file or folder.
FilesetMimeType(String mimeType)
Sets the MIME type of the file or folder.
List<String>getParentFolder()
Obtains the IDs of the parent folders of the file.
FilesetParentFolder(List<String> parentFolder)
Sets the IDs of the parent folders of the file.
com.huawei.cloud.base.util.DateTimegetCreatedTime()
Obtains the creation time of the file or folder.
FilesetCreatedTime(com.huawei.cloud.base.util.DateTime createdTime)
Sets the creation time of the file or folder.
com.huawei.cloud.base.util.DateTimegetEditedTime()
Obtains the last modification time of the file or folder.
FilesetEditedTime (com.huawei.cloud.base.util.DateTime editedTime)
Sets the last modification time of the file or folder.
StringgetDescription()
Obtains the short description of the file or folder.
FilesetDescription(String description)
Sets the short description of the file or folder.
List<User>getOwners()
Obtains the users to whom the file or folder belongs.
FilesetOwners(List<User> owners)
Sets the users to whom the file or folder belongs.
BooleangetFavorite()
Checks whether the file or folder is marked.
FilesetFavorite(Boolean favorite)
Sets whether the file or folder is marked.
BooleangetRecycled()
Checks whether the file or folder has been moved to the recycle bin.
FilesetRecycled (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.
FilesetAppSettings(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.
FilesetProperties(Map<String, String> properties)
Sets custom file attributes that are visible to all apps.
Fileset(String fieldName, Object value)
Sets the given field value for the given field name.
Fileclone()
Clones a File object.
File.CapabilitiesgetCapabilities()
Obtains the current user’s permissions for the file. Each permission corresponds to an action that can be taken by the user.
File.ContentExtrasgetContentExtras()
Obtains additional information about file content.
BooleangetWriterHasCopyPermission()
Checks whether readers and commenters of the file have the copy, print, and download permissions for the file.
BooleangetDirectlyRecycled()
Checks whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively.
StringgetFileSuffix()
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.
StringgetFullFileSuffix()
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.
BooleangetExistThumbnail()
Checks whether the file has a thumbnail.
StringgetIconDownloadLink()
Obtains the link to the icon of the file.
File.PictureMetadatagetPictureMetadata()
Obtains additional metadata of a media file.
BooleangetIsAppAuthorized()
Checks whether the file is created or opened by the requesting app.
UsergetLastEditor()
Obtains information about the last user who modifies the file.
BooleangetEditedByMe()
Checks whether the file is modified by the current user.
com.huawei.cloud.base.util.DateTimegetEditedByMeTime()
Obtains the last time when the file was modified by the current user.
BooleangetOwnedByMe()
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.
LonggetOccupiedSpace()
Obtains the storage space occupied by the file.
StringgetSha256()
Obtains the SHA-256 value for verifying the file.
BooleangetHasShared()
Checks whether the file is shared.
com.huawei.cloud.base.util.DateTimegetSharedWithMeTime()
Obtains the time when the file is shared by a user, RFC 3339 date-time.
UsergetSharer()
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.
StringgetThumbnailDownloadLink()
Obtains the link to the thumbnail of the file.
com.huawei.cloud.base.util.DateTimegetRecycledTime()
Obtains the time when the file is moved to the recycle bin, RFC 3339 date-time.
UsergetRecyclingUser()
Obtains the user who moves the file to the recycle bin. 
File.VideoMetadatagetVideoMetadata()
Obtains additional video metadata.
StringgetContentDownloadLink()
Obtains the link for downloading the file in a browser.
BooleangetWritersHasSharePermission()
Checks whether a user who has only the write permission for the file can modify the permission of the file.
FilesetCapabilities(Capabilities capabilities)
Sets the current user’s permissions for the file. Each permission corresponds to an action that can be taken by the user.
FilesetContentExtras(ContentExtras contentExtras)
Sets additional information about file content.
FilesetWriterHasCopyPermission(Boolean writerHasCopyPermission)
Sets whether readers and commenters of the file have the copy, print, and download permissions for the file.
FilesetDirectlyRecycled(Boolean directlyRecycled)
Sets whether the file is directly moved to the recycle bin rather than deleted from its parent folder recursively.
FilesetFileSuffix(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.
FilesetFullFileSuffix(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.
FilesetExistThumbnail(Boolean existThumbnail)
Sets whether the file has a thumbnail.
FilesetIconDownloadLink(String iconDownloadLink)
Sets the link to the icon of the file.
FilesetPictureMetadata(PictureMetadata pictureMetadata)
Sets additional metadata of a media file.
FilesetIsAppAuthorized(Boolean isAppAuthorized)
Sets whether the file is created or opened by the requesting app.
FilesetLastEditor(User lastEditor)
Sets information about the last user who modifies the file.
FilesetEditedByMe(Boolean editedByMe)
Sets whether the file is modified by the current user.
FilesetEditedByMeTime(com.huawei.cloud.base.util.DateTime editedByMeTime)
Sets the last time when the file was modified by the current user.
FilesetOwnedByMe(Boolean ownedByMe)
Sets whether the current user owns the file.
FilesetPermissionIds(List<String> permissionIds)
Sets the IDs of permissions for users to access the file.
FilesetPermissions(List<Permission> permissions)
Sets the list of all permissions for the file.
FilesetOccupiedSpace(Long occupiedSpace)
Sets the storage space occupied by the file, in bytes.
FilesetSha256(String sha256)
Sets the SHA-256 value for verifying the file.
FilesetHasShared(Boolean hasShared)
Sets whether the file is shared.
FilesetSharedWithMeTime(com.huawei.cloud.base.util.DateTime sharedWithMeTime)
Sets the time when the file is shared by a user, RFC 3339 date-time.
FilesetSharer(User sharer)
Sets the user who shares the file.
FilesetContainers(List<String> containers)
Sets the types of space that may contain the file.
FilesetThumbnailDownloadLink(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.
FilesetRecycledTime(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.

FilesetVideoMetadata(File.VideoMetadata videoMetadata)
Sets additional video metadata.
FilesetContentDownloadLink(String contentDownloadLink)
Sets the link for downloading the file in a browser.
FilesetWritersHasSharePermission(Boolean writersHasSharePermission)
Sets whether a user who has only the write permission for the file can modify the permission of the file.
StringgetContentVersion()
Obtains the entity file content version number.
FilesetContentVersion(String contentVersion)
Sets the entity file content version number.
StringgetSignedDownloadLink()
Obtains the download link of a file played online.
FilesetSignedDownloadLink(String signedDownloadLink)
Sets the download link of a file played online.
StringgetLastHistoryVersionId()
Obtains the latest file version ID.
StringgetOriginalFilename()
Obtains the original file name.
LonggetThumbnailVersion()
Obtains the thumbnail version number.
LonggetVersion()
Obtains the increasing version number of a file.
StringgetOnLineViewLink()
Obtains the link for opening a file online in the browser.
FilesetLastHistoryVersionId(String lastHistoryVersionId)
Sets the latest file version ID.
FilesetOriginalFilename(String originalFilename)
Sets the original file name.
FilesetThumbnailVersion(Long thumbnailVersion)
Sets the thumbnail version number.
FilesetVersion(Long version)
Sets the increasing version number of a file.
FilesetOnLineViewLink(String onLineViewLink)
Sets the link for opening a file online in the browser.

Public Constructors

constructor
File()
Constructs a File object.

Public Methods

Method
public String getCategory()
Obtains the resource type, which is always drive#file.

Return

typedesc
StringResource type, which is always drive#file.


Method
public File setCategory(String category)
Sets the resource type, which is always drive#file.

Parameters

Parameter nameParameter desc
categoryResource type, which is always drive#file.

Return

typedesc
FileA File object.


Method
public String getId()
Obtains the unique ID of the file or folder.

Return

typedesc
StringUnique ID of the file or folder.


Method
public File setId(String id)
Sets the unique ID of the file or folder.

Parameters

Parameter nameParameter desc
idUnique ID of the file or folder.

Return

typedesc
FileA File object.


Method
public String getFileName ()
Obtains the name of the file or folder.

Return

typedesc
StringFile or folder name.


Method
public File setFileName(String fileName)
Sets the name of the file or folder.

Parameters

Parameter nameParameter desc
fileNameFile or folder name, which cannot contain any of the following characters:\ / :  ? *“ < > |

Return

typedesc
FileA File object.


Method
public Long getSize()
Obtains the size of the file. The size attribute is applicable only to files.

Return

typedesc
LongFile size.


Method
public File setSize(Long size)
Sets the size of the file. The size attribute is applicable only to files.

Parameters

Parameter nameParameter desc
sizeFile size.

Return

typedesc
FileA File object.


Method
public String getMimeType ()
Obtains the MIME type of the file or folder.

Return

typedesc
StringMIME type of the file or folder.


Method
public File setMimeType(String mimeType)
Sets the MIME type of the file or folder.

Parameters

Parameter nameParameter desc
mimeTypeMIME 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

typedesc
FileA File object.


Method
public List<String> getParentFolder()
Obtains the IDs of the parent folders of the file.

Return

typedesc
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 nameParameter desc
parentFolderIDs 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

typedesc
FileA 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

typedesc
com.huawei.cloud.base.util.DateTimeCreation 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 nameParameter desc
createdTimeCreation time of the file or folder, in RFC 3339 date-time format.

Return

typedesc
FileA 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

typedesc
com.huawei.cloud.base.util.DateTimeLast 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 nameParameter desc
editedTimeLast modification time of the file or folder, in RFC 3339 date-time format.

Return

typedesc
FileA File object.


Method
public String getDescription()
Obtains the short description of the file or folder.

Return

typedesc
StringShort description of the file or folder.


Method
public File setDescription(String description)
Sets the short description of the file or folder.

Parameters

Parameter nameParameter desc
descriptionShort description of the file or folder.

Return

typedesc
FileA File object.


Method
public List<User> getOwners()
Obtains the users to whom the file or folder belongs.

Return

typedesc
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 nameParameter desc
ownersUsers to whom the file or folder belongs.

Return

typedesc
FileA File object.


Method
public Boolean getFavorite()
Checks whether the file or folder is marked.

Return

typedesc
BooleanWhether the file or folder is marked.


Method
public File setFavorite(Boolean favorite)
Sets whether the file or folder is marked.

Parameters

Parameter nameParameter desc
favoriteIndicates 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

typedesc
FileA File object.


Method
public Boolean getRecycled()
Checks whether the file or folder has been moved to the recycle bin.

Return

typedesc
BooleanWhether 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 nameParameter 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

typedesc
FileA File object.


Method
public Map<String,String> getAppSettings()
Obtains custom file attributes that are private to the requesting app.

Return

typedesc
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 nameParameter desc
appSettingsCustom file attributes. The value is a collection of key-value pairs that are private to the requesting app.

Return

typedesc
FileA File object.


Method
public Map<String,String> getProperties()
Obtains custom file attributes that are visible to all apps.

Return

typedesc
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 nameParameter desc
propertiesCustom file attributes. The value is a collection of key-value pairs that are visible to all apps.

Return

typedesc
FileA File object.


Method

public File set(String fieldName, Object value)

Sets the given field value for the given field name.

Parameters

Parameter nameParameter desc
fieldNameField name.
valueField value.

Return

typedesc
FileA File object.


Method
public File clone ()
Clones a File object.

Return

typedesc
FileA 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

typedesc
File.CapabilitiesA 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

typedesc
File.ContentExtrasA 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

typedesc
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

typedesc
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

typedesc
StringFinal 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

typedesc
StringFull 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

typedesc
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

typedesc
StringLink to the static unauthorized icon of the file.


Method
public File.PictureMetadata getPictureMetadata()
Obtains additional metadata of a media file.

Return

typedesc
File.PictureMetadataAdditional metadata of a media file.


Method
public Boolean getIsAppAuthorized()
Checks whether the file is created or opened by the requesting app.

Return

typedesc
BooleanWhether 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

typedesc
UserInformation about the last user who modifies the file.


Method
public Boolean getEditedByMe()
Checks whether the file is modified by the current user.

Return

typedesc
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

typedesc
com.huawei.cloud.base.util.DateTimeLast time when the file was modified by the current user.


Method
public Boolean getOwnedByMe()
Checks whether the current user owns the file.

Return

typedesc
BooleanWhether the current user owns the file.


Method
public List<String> getPermissionIds()
Obtains the IDs of permissions for users to access the file.

Return

typedesc
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

typedesc
List<Permission>List of all permissions for the file.


Method
public Long getOccupiedSpace()
Obtains the storage space occupied by the file, in bytes.

Return

typedesc
LongStorage space occupied by the file, in bytes.


Method
public String getSha256()
Obtains the SHA-256 value for verifying the file.

Return

typedesc
StringSHA-256 value for verifying the file.


Method
public Boolean getHasShared()
Checks whether the file is shared.

Return

typedesc
BooleanWhether 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

typedesc
com.huawei.cloud.base.util.DateTimeTime when the file is shared by a user, RFC 3339 date-time.


Method
public User getSharer()
Obtains the user who shares the file.

Return

typedesc
UserUser who shares the file.


Method
public List<String> getContainers()
Obtains the types of space that may contain the file.

Return

typedesc
List<String>Types of space that may contain the file.


Method
public String getThumbnailDownloadLink()
Obtains the link to the thumbnail of the file.

Return

typedesc
StringLink 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

typedesc
com.huawei.cloud.base.util.DateTimeTime 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

typedesc
UserUser who moves the file to the recycle bin.


Method
public File.VideoMetadata getVideoMetadata()
Obtains additional video metadata.

Return

typedesc
File.VideoMetadataAdditional video metadata.


Method
public String getContentDownloadLink()
Obtains the link for downloading the file in a browser.

Return

typedesc
StringLink 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

typedesc
BooleanWhether 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 nameParameter desc
capabilitiesCurrent user’s permissions for the file.

Return

typedesc
FileA File object.


Method
public File setContentExtras(ContentExtras contentExtras)
Sets additional information about file content.

Parameters

Parameter nameParameter desc
contentExtrasAdditional information about file content.

Return

typedesc
FileA 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 nameParameter 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

typedesc
FileA 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 nameParameter desc
directlyRecycledIndicates whether the file is directly moved to the recycle bin.

Return

typedesc
FileA 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 nameParameter desc
fileSuffixFinal component of the full file name suffix.

Return

typedesc
FileA 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 nameParameter desc
fullFileSuffixFull file name suffix extracted from the name field. The full file name suffix may contain multiple concatenated suffixes, for example, tar.gz.

Return

typedesc
FileA File object.


Method
public File setExistThumbnail(Boolean existThumbnail)
Sets whether the file has a thumbnail.

Parameters

Parameter nameParameter desc
existThumbnailIndicates whether the file has a thumbnail. The value is of the Boolean type.

Return

typedesc
FileA File object.


Method
public File setIconDownloadLink(String iconDownloadLink)
Sets the link to the icon of the file.

Parameters

Parameter nameParameter desc
iconDownloadLinkLink to the icon of the file.

Return

typedesc
FileA File object.


Method
public File setPictureMetadata(PictureMetadata pictureMetadata)
Sets additional metadata of a media file.

Parameters

Parameter nameParameter desc
pictureMetadataAdditional metadata of a media file.

Return

typedesc
FileA File object.


Method
public File setIsAppAuthorized(Boolean isAppAuthorized)
Sets whether the file is created or opened by the requesting app.

Parameters

Parameter nameParameter 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

typedesc
FileA File object.


Method
public File setLastEditor(User lastEditor)
Sets information about the last user who modifies the file.

Parameters

Parameter nameParameter desc
lastEditorInformation about the last user who modifies the file.

Return

typedesc
FileA File object.


Method
public File setEditedByMe(Boolean editedByMe)
Sets whether the file is modified by the current user.

Parameters

Parameter nameParameter 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

typedesc
FileA 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 nameParameter desc
editedByMeTimeLast time when the file was modified by the current user.

Return

typedesc
FileA File object.


Method
public File setOwnedByMe(Boolean ownedByMe)
Sets whether the current user owns the file.

Parameters

Parameter nameParameter desc
ownedByMeIndicates whether the current user owns the file.

Return

typedesc
FileA File object.


Method
public File setPermissionIds(List<String>permissionIds)
Sets the IDs of permissions for users to access the file.

Parameters

Parameter nameParameter desc
permissionIdsIDs of permissions for users to access the file.

Return

typedesc
FileA 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 nameParameter desc
permissionsAll 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

typedesc
FileA File object.


Method
public File setOccupiedSpace(Long occupiedSpace)
Sets the storage space occupied by the file.

Parameters

Parameter nameParameter desc
occupiedSpaceStorage space occupied by the file.

Return

typedesc
FileA File object.


Method
public File setSha256(String sha256)
Sets the SHA-256 value for verifying the file.

Parameters

Parameter nameParameter desc
sha256SHA-256 value for verifying the file.

Return

typedesc
FileA File object.


Method
public File setHasShared(Boolean hasShared)
Sets whether the file is shared.

Parameters

Parameter nameParameter desc
hasSharedIndicates whether the file is shared.

Return

typedesc
FileA 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 nameParameter desc
sharedWithMeTimeTime when the file is shared by a user, RFC 3339 date-time.

Return

typedesc
FileA File object.


Method
public File setSharer(User sharer)
Sets the user who shares the file.

Parameters

Parameter nameParameter desc
sharerUser who shares the file.

Return

typedesc
FileA 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 nameParameter desc
containersTypes of space that may contain the file. The options are drive and applicationData.

Return

typedesc
FileA 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 nameParameter desc
thumbnailDownloadLinkLink to the thumbnail of the file. The link is set only when the requesting app has the permission to access the file content.

Return

typedesc
FileA 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 nameParameter desc
recycledTimeTime when the file is moved to the recycle bin, RFC 3339 date-time.

Return

typedesc
FileA File object.


Method
public File setRecyclingUser(User recyclingUser)
Sets the user who moves the file to the recycle bin.

Parameters

Parameter nameParameter desc
recyclingUserUser who moves the file to the recycle bin.

Return

typedesc
FileA File object.


Method
public File setVideoMetadata(File.VideoMetadata videoMetadata)
Sets additional video metadata.

Parameters

Parameter nameParameter desc
videoMetadataAdditional video metadata.

Return

typedesc
FileA File object.


Method
public File setContentDownloadLink(String contentDownloadLink)
Sets the link for downloading the file in a browser.

Parameters

Parameter nameParameter desc
contentDownloadLinkLink for downloading the file in a browser.

Return

typedesc
FileA 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

writersHasSharePermissionParameter desc
writersHasSharePermissionIndicates whether a user who has only the write permission for the file can modify the permission of the file.

Return

typedesc
FileA File object.


Method
public String getContentVersion()
Obtains the entity file content version number.

Return

typedesc
StringEntity file content version number.


Method
public File setContentVersion(String contentVersion)
Sets the entity file content version number.

Parameters

contentVersionParameter desc
contentVersionEntity file content version number.

Return

typedesc
FileA File object.


Method
public String getSignedDownloadLink()
Obtains the download link of a file played online.

Return

typedesc
StringDownload link of a file played online.


Method
public File setSignedDownloadLink(String signedDownloadLink)
Sets the download link of a file played online.

Parameters

signedDownloadLinkParameter desc
signedDownloadLinkDownload link of a file played online.

Return

typedesc
FileA File object.


Method
public String getLastHistoryVersionId()
Obtains the latest file version ID.

Return

typedesc
StringLatest file version ID.


Method
public String getOriginalFilename()
Obtains the original file name.

Return

typedesc
StringOriginal file name.


Method
public Long getThumbnailVersion()
Obtains the thumbnail version.

Return

typedesc
LongThumbnail version number.


Method
public Long getVersion()
Obtains the increasing version number of a file.

Return

typedesc
LongIncreasing version number of a file.


Method
public String getOnLineViewLink()
Obtains the link for opening a file online in the browser.

Return

typedesc
StringLink for opening a file online in the browser.


Method
public File setLastHistoryVersionId(String lastHistoryVersionId)
Sets the latest file version ID.

Parameters

writersHasSharePermissionParameter desc
lastHistoryVersionIdLatest file version ID.

Return

typedesc
FileA File object.


Method
public File setOriginalFilename(String originalFilename)
Sets the original file name.

Parameters

originalFilenameParameter desc
originalFilenameOriginal file name.

Return

typedesc
FileA File object.


Method
public File setThumbnailVersion(Long thumbnailVersion)
Sets the thumbnail version number.

Parameters

thumbnailVersionParameter desc
thumbnailVersionThumbnail version number.

Return

typedesc
FileA File object.


Method
public File setVersion(Long version)
Sets the increasing version number of a file.

Parameters

versionParameter desc
versionIncreasing version number of a file.

Return

typedesc
FileA File object.


Method
public File setOnLineViewLink(String onLineViewLink)
Sets the link for opening a file online in the browser.

Parameters

onLineViewLinkParameter desc
onLineViewLinkLink for opening a file online in the browser.

Return

typedesc
FileA File object.