Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AGCStorageReference

Hierarchy

  • AGCStorageBaseService
    • AGCStorageReference

Index

Methods

child

  • en

    Obtains the reference to a subdirectory.

    zh

    获取子目录的引用

    Parameters

    • objectPath: string

      Path of a subdirectory. If the path does not exist, null is returned.

    Returns AGCStorageReference

    StorageReference instance of the subdirectory.

compareTo

  • en

    Compares reference addresses.

    zh

    比较引用地址。

    Parameters

    Returns number

    Reference comparison result.

delete

  • delete(): void
  • en

    Deletes a file from the cloud server.

    zh

    删除云端文件

    Returns void

equals

  • en

    Compares references.

    zh

    比较引用是否相同。

    Parameters

    Returns boolean

    Whether the references are the same. true: yes false: no

getActiveDownloadTasks

  • en

    Obtains the ongoing download task list under the current reference.

    zh

    获取当前引用下处于运行状态的下载任务列表。

    Returns AGCUploadTask[]

getActiveUploadTasks

  • en

    Obtains the ongoing upload task list under the current reference.

    zh

    获取当前引用下处于运行状态的上传任务列表。

    Returns AGCUploadTask[]

getBucket

  • getBucket(): string
  • en

    Obtains the name of a storage instance.

    zh

    获取引用所在的存储实例名称

    Returns string

    Name of a storage instance.

getDownloadUrl

  • getDownloadUrl(): void
  • en

    Obtains the sharing URL of a cloud file.

    zh

    获取云端文件的分享地址。

    Returns void

getFile

  • en

    Downloads a cloud file to a local file with a specified URI. The local file is managed by your app. When the local file size is not 0 KB (resumable download), the API uses the local file size as the offset position to continue download from the cloud server.

    zh

    下载一个云端文件到指定的本地文件(文件由App管理,当文件大小超过0字节时,该接口会将文件大小作为断点续传的偏移位置,继续从云端下载)。

    Parameters

    • filePath: string

      Path to which data needs to be written, which must be created in advance.

    Returns AGCDownloadTask

    download task

getFileMetadata

  • getFileMetadata(): void
  • en

    Obtains metadata of a file or directory.

    zh

    获取文件或目录的元数据

    Returns void

getName

  • getName(): string
  • en

    Obtains a file name.

    zh

    获取文件名

    Returns string

    Name of a file or directory on the cloud server.

getParent

  • en

    Obtains the reference to a directory.

    zh

    获取父目录的引用。

    Returns AGCStorageReference

    StorageReference instance of the directory. If the current directory is the root directory, the reference to the root directory is returned.

getPath

  • getPath(): string
  • en

    Obtains the path of a file on the cloud server.

    zh

    获取云端文件的路径

    Returns string

    Name of the path of a file or directory on the cloud server.

getRoot

  • en

    Obtains the reference to the root directory.

    zh

    获取根目录引用。

    Returns AGCStorageReference

    StorageReference path of the root directory.

hashCode

  • hashCode(): number
  • en

    Obtains the hashcode of a reference.

    zh

    返回引用的hashcode值。

    Returns number

    Hashcode

list

  • list(max: number, marker?: string): void
  • en

    Obtains the file list in the current directory in pagination mode. The file list includes files and subdirectories.

    zh

    分页获取当前目录下的文件列表,包括文件和子目录。

    Parameters

    • max: number

      Total number of files and subdirectories to be obtained. The value of max ranges from 1 to 1000.

    • Default value marker: string = ""

      Pagination identifier. Call the ListResult.getPageMarker method to obtain the pagination identifier of the next page, and then call this method to obtain the data of the next page.

    Returns void

listAll

  • listAll(): void
  • en

    Obtains all objects in a directory, including files and subdirectories.

    zh

    获取目录下所有对象,包含文件和子目录。

    Returns void

putFile

  • putFile(filePath: string, metadata?: {}, offset?: number): AGCUploadTask
  • en

    Stores binary data of a local file on the cloud server. Resumable upload is supported.

    zh

    将本地文件的二进制数据存储到云端,支持断点续传。

    Parameters

    • filePath: string

      Path of a file to be uploaded. The total size cannot exceed 50 GB.

    • Default value metadata: {} = {}

      Metadata of a file or directory.

    • Default value offset: number = -1

      Position of resumable download. Set this parameter to the number of bytes that have been passed.

    Returns AGCUploadTask

    upload task

toString

  • toString(): string
  • en

    Returns the reference URL.

    zh

    返回引用的Url地址。

    Returns string

    Reference URL.

updateFileMetadata

  • updateFileMetadata(metedata: any): void
  • en

    Updates metadata of a file or directory.

    zh

    更新文件元数据,采用覆盖更新的方式。

    Parameters

    • metedata: any

      Metadata of the file or directory to be updated.

    Returns void

Static callStaticMethod

  • callStaticMethod(...args: (number | boolean | string)[]): any
  • Parameters

    • Rest ...args: (number | boolean | string)[]

    Returns any

Generated using TypeDoc