Skip to content

S3FileSystem

Defined in: src/s3.ts:41

  • CloudFS<_S3Error>

new S3FileSystem(client, bucketName, prefix?, cacheTTL?): S3FileSystem

Defined in: src/s3.ts:46

S3

string

string = ''

number

S3FileSystem

CloudFS<_S3Error>.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: src/s3.ts:44

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


protected bucketName: string

Defined in: src/s3.ts:48


readonly cacheTTL: number = 3600

Defined in: src/cloudfs.ts:29

CloudFS.cacheTTL


protected client: S3

Defined in: src/s3.ts:47


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

Defined in: src/cloudfs.ts:30

_S3Error

string

Exception

CloudFS.convertError


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


protected prefix: string

Defined in: src/s3.ts:42


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/s3.ts:125

string

Inode

Promise<void>

CloudFS._create


protected _delete(path): Promise<void>

Defined in: src/s3.ts:105

string

Promise<void>

CloudFS._delete


_move(from, to): Promise<void>

Defined in: src/s3.ts:113

string

string

Promise<void>

CloudFS._move


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

Defined in: src/s3.ts:140

string

Promise<Uint8Array<ArrayBufferLike>>

CloudFS._read


_stat(path): Promise<Inode>

Defined in: src/s3.ts:68

string

Promise<Inode>

Handle prefix

CloudFS._stat


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

Defined in: src/s3.ts:152

string

Partial<InodeLike>

Promise<void>

CloudFS._touch


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

Defined in: src/s3.ts:166

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/s3.ts:84

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: src/s3.ts:57

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