Zpfs_s3compat
Extends:
User API for file management
User API for virtual file management and http file upload This API contains all the verbs needed to browse, upload and remove files. Files are stored on a per-user basis: each user has his or her own whole virtual filesystem. Uploading a file is a 3-step process : request an upload URL, upload via HTTP, notify this service of completion.
Static Member Summary
Static Public Members | ||
public static get |
Get default deployment id associated to Zpfs_s3compat service |
Method Summary
Public Methods | ||
public |
cp(objectPattern: {"oldPath": *, "path": *, "owner": *}): * Copies a file |
|
public |
du(objectPattern: {"path": *, "owner": *}): * Returns disk usage |
|
public |
link(objectPattern: {"oldPath": *, "path": *, "owner": *}): * Links a file |
|
public |
ls(objectPattern: {"folder": *, "owner": *, "page": *}): * Lists a folder content |
|
public |
mkdir(objectPattern: {"parents": *, "folder": *, "owner": *}): * Creates a folder |
|
public |
mv(objectPattern: {"oldPath": *, "path": *, "owner": *}): * Moves a file |
|
public |
newFile(objectPattern: {"tags": *, "guid": *, "metadata": *, "owner": *}): * Notifies of upload completion |
|
public |
newUploadUrl(objectPattern: {"contentType": *, "path": *, "owner": *}): * Requests an upload URL |
|
public |
rm(objectPattern: {"path": *, "owner": *}): * Removes a file |
|
public |
snapshot(objectPattern: {"parents": *, "folder": *, "items": *, "flatten": *, "owner": *}): * Creates a snapshot in a new folder |
|
public |
stat(objectPattern: {"path": *, "owner": *}): * Returns information about a file |
|
public |
updateMeta(objectPattern: {"path": *, "metadataFiles": *, "metadata": *, "owner": *}): * Updates a file's metadata |
Static Public Members
Public Methods
public cp(objectPattern: {"oldPath": *, "path": *, "owner": *}): * source
Copies a file
Copies a file or folder (recursively) to a new location. May fail if the target location is not empty.
Params:
Name | Type | Attribute | Description |
objectPattern | {"oldPath": *, "path": *, "owner": *} |
|
Return:
* |
public du(objectPattern: {"path": *, "owner": *}): * source
Returns disk usage
Returns an recursively aggregated number of used bytes, starting at the given path.
Params:
Name | Type | Attribute | Description |
objectPattern | {"path": *, "owner": *} |
|
Return:
* |
public link(objectPattern: {"oldPath": *, "path": *, "owner": *}): * source
Links a file
Links a file or folder to another location. May fail if the target location is not empty.
Params:
Name | Type | Attribute | Description |
objectPattern | {"oldPath": *, "path": *, "owner": *} |
|
Return:
* |
public ls(objectPattern: {"folder": *, "owner": *, "page": *}): * source
Lists a folder content
Returns a paginated list of the folder's content.
Params:
Name | Type | Attribute | Description |
objectPattern | {"folder": *, "owner": *, "page": *} |
|
Return:
* |
public mkdir(objectPattern: {"parents": *, "folder": *, "owner": *}): * source
Creates a folder
Creates a new folder. May fail if the target location is not empty.
Params:
Name | Type | Attribute | Description |
objectPattern | {"parents": *, "folder": *, "owner": *} |
|
Return:
* |
public mv(objectPattern: {"oldPath": *, "path": *, "owner": *}): * source
Moves a file
Moves a file or folder (recursively) to a new location. May fail if the target location is not empty.
Params:
Name | Type | Attribute | Description |
objectPattern | {"oldPath": *, "path": *, "owner": *} |
|
Return:
* |
public newFile(objectPattern: {"tags": *, "guid": *, "metadata": *, "owner": *}): * source
Notifies of upload completion
The client application calls this verb to notify that it's done uploading to the cloud. Calling that verb MAY trigger additional events such as thumbnail/metadata creation.
Params:
Name | Type | Attribute | Description |
objectPattern | {"tags": *, "guid": *, "metadata": *, "owner": *} |
|
Return:
* |
public newUploadUrl(objectPattern: {"contentType": *, "path": *, "owner": *}): * source
Requests an upload URL
Requests an HTTP upload URL. The URL contains temporary credentials (typically valid for a few minutes) and is meant for immediate use.
Params:
Name | Type | Attribute | Description |
objectPattern | {"contentType": *, "path": *, "owner": *} |
|
Return:
* |
public rm(objectPattern: {"path": *, "owner": *}): * source
Removes a file
Removes a file or folder (recursively).
Params:
Name | Type | Attribute | Description |
objectPattern | {"path": *, "owner": *} |
|
Return:
* |
public snapshot(objectPattern: {"parents": *, "folder": *, "items": *, "flatten": *, "owner": *}): * source
Creates a snapshot in a new folder
Creates a new folder and then copies the given files inside
Params:
Name | Type | Attribute | Description |
objectPattern | {"parents": *, "folder": *, "items": *, "flatten": *, "owner": *} |
|
Return:
* |
public stat(objectPattern: {"path": *, "owner": *}): * source
Returns information about a file
Returns information about a single file. The entry field will be null if the path does not exist
Params:
Name | Type | Attribute | Description |
objectPattern | {"path": *, "owner": *} |
|
Return:
* |
public updateMeta(objectPattern: {"path": *, "metadataFiles": *, "metadata": *, "owner": *}): * source
Updates a file's metadata
Params:
Name | Type | Attribute | Description |
objectPattern | {"path": *, "metadataFiles": *, "metadata": *, "owner": *} |
|
Return:
* |