Skip to main content

GCSFinder

@webda/gcp


Class: GCSFinder

Defined in: gcp/src/services/storage.service.ts:69

Google Storage Finder implementation

Implements​

  • StorageFinder

Constructors​

Constructor​

new GCSFinder(options?): GCSFinder

Defined in: gcp/src/services/storage.service.ts:74

Parameters​

options?​

StorageOptions

GCS client options

Returns​

GCSFinder

Methods​

find()​

find(currentPath, options?): Promise<string[]>

Defined in: gcp/src/services/storage.service.ts:129

Find files under a gs:// url

Parameters​

currentPath​

string

the gs:// url to search

options?​

object & object

only filterPattern and processor are used

Returns​

Promise<string[]>

the files found

Implementation of​

StorageFinder.find


getInfo()​

getInfo(path): object

Defined in: gcp/src/services/storage.service.ts:83

Get info from url

Parameters​

path​

string

the gs:// url

Returns​

object

the bucket and key

bucket​

bucket: string

key​

key: string


getReadStream()​

getReadStream(path): Promise<Readable>

Defined in: gcp/src/services/storage.service.ts:164

Get a read stream

Parameters​

path​

string

the gs:// url

Returns​

Promise<Readable>

the read stream

Implementation of​

StorageFinder.getReadStream


getWriteStream()​

getWriteStream(path): Promise<Writable>

Defined in: gcp/src/services/storage.service.ts:154

Get a write stream

Parameters​

path​

string

the gs:// url

Returns​

Promise<Writable>

the write stream

Implementation of​

StorageFinder.getWriteStream


walk()​

walk(path, processor, _options?, _depth?): Promise<void>

Defined in: gcp/src/services/storage.service.ts:106

Depth or options is ignored

Parameters​

path​

string

the gs:// url to walk

processor​

(filepath) => void

called for each file found

_options?​

ignored

boolean

includeDir?​

boolean

maxDepth?​

number

boolean

_depth?​

number

ignored

Returns​

Promise<void>

Implementation of​

StorageFinder.walk