oss_list()

Read(420) Label: storage bucket, object list,

Description:

List files in OSS buckets or the specified bucket.

Syntax:

oss_list(fd,[bucket])

Note:

External library function (See External Library Guide).

 

The function lists files in OSS buckets or the specified bucket and returns a table sequence containing the files or certain properties of the storage buckets.

 

It lists all files in the specified bucket bucket when all parameters are present; in the returned table sequence, Key field contains file names, Size field records file sizes in the unit of byte, and Date field is the creation time or the last modified time of the current file.

 

It lists all OSS buckets when parameter bucket is absent; in the returned table sequence, Key field represents the storage bucket name and Size field won’t be displayed.

Parameter:

fd

OSS connection object

bucket

Bucket name

Return value:

Table sequence

Example:

 

A

 

1

=oss_open("LTAI5tRgzSpjU73Wt","4dNAtbcjF6arKp26JGaytM","http://oss-cn-beijing.aliyuncs.com")

 

2

=oss_list(A1,"mybucket102")

Return a list of names of all files in bucket named mybucket102.

3

=oss_list(A1)

Return a list of storage buckets.

4

>oss_close(A1)

Close the OSS connection.