Skip to content

GoogleDriveFS

Defined in: src/gdrive.ts:31

  • CloudFS<DriveError>

new GoogleDriveFS(drive, cacheTTL?): GoogleDriveFS

Defined in: src/gdrive.ts:36

typeof drive

A fully authenticated Google APIs client.

number

GoogleDriveFS

CloudFS<DriveError>.constructor

protected optional _mountPoint?: string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:143

Internal

The last place this file system was mounted

CloudFS._mountPoint


protected optional _sync?: FileSystem

Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:18

Internal

CloudFS._sync


protected _uuid: `${string}-${string}-${string}-${string}-${string}`

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:149

Internal

The UUID of the file system.

CloudFS._uuid


readonly attributes: ConstMap<FileSystemAttributes, keyof FileSystemAttributes, void | CaseFold | undefined> & Map<string, any>

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:154

FileSystemAttributes

CloudFS.attributes


readonly cacheTTL: number = 3600

Defined in: src/cloudfs.ts:29

CloudFS.cacheTTL


protected convertError: (error, message?) => Exception

Defined in: src/cloudfs.ts:30

DriveError

string

Exception

CloudFS.convertError


protected drive: typeof drive

Defined in: src/gdrive.ts:40

A fully authenticated Google APIs client.


optional label?: string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:138

CloudFS.label


readonly name: string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:137

The name for this file system. For example, tmpfs for an in memory one

CloudFS.name


protected partialCache: Map<string, CacheEntry>

Defined in: src/cloudfs.ts:116

CloudFS.partialCache


readonly type: number

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:132

A unique ID for this kind of file system. Currently unused internally, but could be used for partition tables or something

CloudFS.type

get uuid(): `${string}-${string}-${string}-${string}-${string}`

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:150

`${string}-${string}-${string}-${string}-${string}`

CloudFS.uuid

protected _create(path, inode): Promise<void>

Defined in: src/gdrive.ts:122

string

Inode

Promise<void>

CloudFS._create


protected _delete(path): Promise<void>

Defined in: src/gdrive.ts:141

string

Promise<void>

CloudFS._delete


protected _move(from, to): Promise<void>

Defined in: src/gdrive.ts:92

string

string

Promise<void>

CloudFS._move


protected _read(path): Promise<Uint8Array<ArrayBufferLike>>

Defined in: src/gdrive.ts:175

string

Promise<Uint8Array<ArrayBufferLike>>

CloudFS._read


protected _stat(path): Promise<Inode>

Defined in: src/gdrive.ts:100

string

Promise<Inode>

CloudFS._stat


protected optional _touch(path, inode): Promise<void>

Defined in: src/cloudfs.ts:89

string

Partial<InodeLike>

Promise<void>

CloudFS._touch


protected _write(path, body): Promise<void>

Defined in: src/gdrive.ts:191

string

Uint8Array

Promise<void>

CloudFS._write


createFile(path, options): Promise<Inode>

Defined in: src/cloudfs.ts:58

Create the file at path with the given options.

string

CreationOptions

Promise<Inode>

CloudFS.createFile


abstract createFileSync(path, options): InodeLike

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:190

Create the file at path with the given options.

string

CreationOptions

InodeLike

CloudFS.createFileSync


exists(path): Promise<boolean>

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:202

Test whether or not path exists.

string

Promise<boolean>

CloudFS.exists


existsSync(path): boolean

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:206

Test whether or not path exists.

string

boolean

CloudFS.existsSync


protected getValidContents(path, syscall): Promise<Uint8Array<ArrayBufferLike>>

Defined in: src/cloudfs.ts:118

string

string

Promise<Uint8Array<ArrayBufferLike>>

CloudFS.getValidContents


link(): Promise<void>

Defined in: src/cloudfs.ts:97

Promise<void>

CloudFS.link


abstract linkSync(target, link): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:208

string

string

void

CloudFS.linkSync


mkdir(path, options): Promise<Inode>

Defined in: src/cloudfs.ts:79

string

CreationOptions

Promise<Inode>

CloudFS.mkdir


abstract mkdirSync(path, options): InodeLike

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:196

string

CreationOptions

InodeLike

CloudFS.mkdirSync


queueDone(): Promise<void>

Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:22

Promise<void>

CloudFS.queueDone


read(path, buffer, offset, end): Promise<void>

Defined in: src/cloudfs.ts:103

Reads into a buffer

string

Uint8Array

The buffer to read into. You must set the byteOffset and byteLength appropriately!

number

number

The position in the file to stop reading

Promise<void>

CloudFS.read


readdir(path): Promise<string[]>

Defined in: src/gdrive.ts:150

string

Promise<string[]>

CloudFS.readdir


abstract readdirSync(path): string[]

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:198

string

string[]

CloudFS.readdirSync


abstract readSync(path, buffer, start, end): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:224

Reads into a buffer

string

Uint8Array

The buffer to read into. You must set the byteOffset and byteLength appropriately!

number

The offset into the file to start reading from

number

The position in the file to stop reading

void

CloudFS.readSync


ready(): Promise<void>

Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:23

Promise<void>

CloudFS.ready


readySync(): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:174

void

CloudFS.readySync


rename(oldPath, newPath): Promise<void>

Defined in: src/cloudfs.ts:43

string

string

Promise<void>

CloudFS.rename


abstract renameSync(oldPath, newPath): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:176

string

string

void

CloudFS.renameSync


rmdir(path): Promise<void>

Defined in: src/cloudfs.ts:73

string

Promise<void>

CloudFS.rmdir


abstract rmdirSync(path): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:194

string

void

CloudFS.rmdirSync


stat(path): Promise<InodeLike<number>>

Defined in: src/cloudfs.ts:50

string

Promise<InodeLike<number>>

CloudFS.stat


abstract statSync(path): InodeLike

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:178

string

InodeLike

CloudFS.statSync


streamRead(path, options): ReadableStream

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:241

Read a file using a stream.

string

StreamOptions

ReadableStream

CloudFS.streamRead


streamWrite(path, options): WritableStream

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:246

Write a file using stream.

string

StreamOptions

WritableStream

CloudFS.streamWrite


sync(): Promise<void>

Defined in: src/cloudfs.ts:95

Promise<void>

CloudFS.sync


abstract syncSync(): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:210

void

CloudFS.syncSync


toString(): string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:166

string

CloudFS.toString


touch(path, metadata?): Promise<void>

Defined in: src/cloudfs.ts:91

Modify metadata.

string

Partial<InodeLike> = {}

Promise<void>

CloudFS.touch


abstract touchSync(path, metadata): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:182

Modify metadata.

string

Partial<InodeLike>

void

CloudFS.touchSync


unlink(path): Promise<void>

Defined in: src/cloudfs.ts:67

string

Promise<void>

CloudFS.unlink


abstract unlinkSync(path): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:192

string

void

CloudFS.unlinkSync


usage(): UsageInfo

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:172

Default implementation.

UsageInfo

Implement

CloudFS.usage


write(path, data, offset?): Promise<void>

Defined in: src/cloudfs.ts:110

Writes a buffer to a file

string

Uint8Array

number = 0

The offset in the file to start writing

Promise<void>

CloudFS.write


abstract writeSync(path, buffer, offset): void

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:236

Writes a buffer to a file

string

Uint8Array

The buffer to write. You must set the byteOffset and byteLength appropriately!

number

The offset in the file to start writing

void

CloudFS.writeSync