Home Manual Reference Source
import {Zpfs_s3compat} from 'zetapush-js/src/mapping/services.js'
public class | source

Zpfs_s3compat

Extends:

src/mapping/core.js~Service → Zpfs_s3compat

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 static get DEFAULT_DEPLOYMENT_ID: string: string source

Get default deployment id associated to Zpfs_s3compat service

Return:

string

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:

NameTypeAttributeDescription
objectPattern {"oldPath": *, "path": *, "owner": *}
  • default: {"oldPath":null,"path":null,"owner":null}

Return:

*

public du(objectPattern: {"path": *, "owner": *}): * source

Returns disk usage

Returns an recursively aggregated number of used bytes, starting at the given path.

Params:

NameTypeAttributeDescription
objectPattern {"path": *, "owner": *}
  • default: {"path":null,"owner":null}

Return:

*

Links a file

Links a file or folder to another location. May fail if the target location is not empty.

Params:

NameTypeAttributeDescription
objectPattern {"oldPath": *, "path": *, "owner": *}
  • default: {"oldPath":null,"path":null,"owner":null}

Return:

*

public ls(objectPattern: {"folder": *, "owner": *, "page": *}): * source

Lists a folder content

Returns a paginated list of the folder's content.

Params:

NameTypeAttributeDescription
objectPattern {"folder": *, "owner": *, "page": *}
  • default: {"folder":null,"owner":null,"page":null}

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:

NameTypeAttributeDescription
objectPattern {"parents": *, "folder": *, "owner": *}
  • default: {"parents":null,"folder":null,"owner":null}

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:

NameTypeAttributeDescription
objectPattern {"oldPath": *, "path": *, "owner": *}
  • default: {"oldPath":null,"path":null,"owner":null}

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:

NameTypeAttributeDescription
objectPattern {"tags": *, "guid": *, "metadata": *, "owner": *}
  • default: {"tags":null,"guid":null,"metadata":null,"owner":null}

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:

NameTypeAttributeDescription
objectPattern {"contentType": *, "path": *, "owner": *}
  • default: {"contentType":null,"path":null,"owner":null}

Return:

*

public rm(objectPattern: {"path": *, "owner": *}): * source

Removes a file

Removes a file or folder (recursively).

Params:

NameTypeAttributeDescription
objectPattern {"path": *, "owner": *}
  • default: {"path":null,"owner":null}

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:

NameTypeAttributeDescription
objectPattern {"parents": *, "folder": *, "items": *, "flatten": *, "owner": *}
  • default: {"parents":null,"folder":null,"items":null,"flatten":null,"owner":null}

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:

NameTypeAttributeDescription
objectPattern {"path": *, "owner": *}
  • default: {"path":null,"owner":null}

Return:

*

public updateMeta(objectPattern: {"path": *, "metadataFiles": *, "metadata": *, "owner": *}): * source

Updates a file's metadata

Params:

NameTypeAttributeDescription
objectPattern {"path": *, "metadataFiles": *, "metadata": *, "owner": *}
  • default: {"path":null,"metadataFiles":null,"metadata":null,"owner":null}

Return:

*