Module: cpb-storage

Cloud Storage Operations

Source:

Members

(static) File

Source:

(static) Metadata

Source:

Methods

(static) BucketList()

Source:

(static) getShopifyStoreIdFromDir(dir, delimiteropt, nullable) → {*|undefined}

returns the numerical value from the directory name

Parameters:
Name Type Attributes Default Description
dir *
delimiter string <optional>
<nullable>
'/'
Source:
Returns:
Type
* | undefined

(async, static) getTopLevelDirs(bucket, versionsnullable, prefixnullable, delimiteropt, nullable) → {Promise.<(Array.<string>|*)>}

Get top-level directories in bucket

Parameters:
Name Type Attributes Default Description
bucket string

storage bucket

versions boolean <nullable>
prefix string <nullable>
delimiter string <optional>
<nullable>
'/'
Source:
Returns:
Type
Promise.<(Array.<string>|*)>

(async, static) getTopLevelFiles(bucket, delimiteropt, nullable, prefixnullable, versionsopt, nullable) → {Promise.<GroupedFiles>}

gets list of loose files in the bucket

Parameters:
Name Type Attributes Default Description
bucket string

storage bucket

delimiter string <optional>
<nullable>
'/'
prefix string <nullable>
versions boolean <optional>
<nullable>
true
Source:
Returns:
Type
Promise.<GroupedFiles>

(static) LSD()

Source:

(async, static) LSD(bucket, delimiteropt, nullable, prefixopt, nullable, versionsopt, nullable) → {Promise.<DirectoryListing>}

Get bucket directory/files listing

Parameters:
Name Type Attributes Description
bucket string

GCS Storage Bucket Name

delimiter string <optional>
<nullable>
prefix string <optional>
<nullable>

directory prefix

versions boolean <optional>
<nullable>

include previous file versions

Source:
Returns:
Type
Promise.<DirectoryListing>