was_file()

Read(164) Label: storage bucket,

Description:

Get the specified object in a WAS storage bucket.

Syntax:

was_file(fd,bucket,key[:cs])

Note:

External library function (See External Library Guide).

 

The returned file object supports file handling functions such as f.exists(), f.name(), f.size(), f.date(), f.read(), f.import() and f.export().

Parameter:

fd

WAS connection object

bucket

Storage bucket name

key

File name in the storage bucket

cs

Encoding name; use the encoding to save or open the file

Return value:

File object

Example:

 

A

 

1

=was_open("mywas","MSU4nLvFd+uYaFw8EtB2GzJ8e==","core.windows.net","https")

Create a WAS connection.

2

=was_file(A1, "test1","emp.txt")

Load emp.txt in storage bucket test1.

3

=A2.name()

Get the full path containing the file name.

4

=A2.import@t()

Return the file data as a table sequence.

5

=A2.cursor@t().fetch(10)

Retrieve data in the way of cursor.

6

>was_close(A1)

Close the WAS connection.