was_copy()

Read(420) Label: storage bucket, copy,

Description:

Copy a file in the WAS storage bucket to local, or a local file to the WAS storage bucket.

Syntax:

was_copy(fd,bucket:key, [localFile])

Note:

External library function (See External Library Guide).

Parameter:

fd

WAS connection object

bucket

Storage bucket name

key

File name in the storage bucket

localFile

A local file name; save the file in the main directory if the parameter is absent

Option:

@u

Copy a local file to the WAS storage bucket; when the local file path is a relative one, it is relative to the main directory

Return value:

Boolean

Example:

 

A

 

1

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

Create a WAS connection.

2

=was_copy(A1, "test1":"test1.txt")

Copy test1.txt in storage bucket test1 tomain directory/test1.

3

=was_copy(A1, "test1":"test1.txt","D:/myBucket/test2.txt")

Copy test1.txt in storage bucket test1 to D:/myBucket/test2.txt.

4

=was_copy@u(A1, "test1":"test3.txt","D:/myBucket/test2.txt")

Copy the local file D:/myBucket/test2.txt to test3.txt in storage bucket test1.

5

>was_close(A1)

Close the WAS connection.