PassthroughFS
Defined in: src/backends/passthrough.ts:18
Internal
Provides a consistent and easy to use internal API.
Default implementations for exists and existsSync are included.
If you are extending this class, note that every path is an absolute path and all arguments are present.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PassthroughFS(
nodeFS,prefix):PassthroughFS
Defined in: src/backends/passthrough.ts:19
Parameters
Section titled “Parameters”nodeFS
Section titled “nodeFS”NodeFS
prefix
Section titled “prefix”string
Returns
Section titled “Returns”PassthroughFS
Overrides
Section titled “Overrides”Properties
Section titled “Properties”_mountPoint?
Section titled “_mountPoint?”
protectedoptional_mountPoint?:string
Defined in: src/internal/filesystem.ts:162
Internal
The last place this file system was mounted
Inherited from
Section titled “Inherited from”
protected_uuid:`${string}-${string}-${string}-${string}-${string}`
Defined in: src/internal/filesystem.ts:169
Internal
The UUID of the file system.
Inherited from
Section titled “Inherited from”attributes
Section titled “attributes”
readonlyattributes:ConstMap<FileSystemAttributes, keyofFileSystemAttributes,void|CaseFold|undefined> &Map<string,any>
Defined in: src/internal/filesystem.ts:178
FileSystemAttributes
Inherited from
Section titled “Inherited from”label?
Section titled “label?”
optionallabel?:string
Defined in: src/internal/filesystem.ts:156
Inherited from
Section titled “Inherited from”
readonlyname:string
Defined in: src/internal/filesystem.ts:191
The name for this file system. For example, tmpfs for an in memory one
Inherited from
Section titled “Inherited from”nodeFS
Section titled “nodeFS”
readonlynodeFS:NodeFS
Defined in: src/backends/passthrough.ts:20
prefix
Section titled “prefix”
readonlyprefix:string
Defined in: src/backends/passthrough.ts:21
readonlytype:number
Defined in: src/internal/filesystem.ts:185
A unique ID for this kind of file system. Currently unused internally, but could be used for partition tables or something
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get uuid():
`${string}-${string}-${string}-${string}-${string}`
Defined in: src/internal/filesystem.ts:171
Returns
Section titled “Returns”`${string}-${string}-${string}-${string}-${string}`
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”createFile()
Section titled “createFile()”createFile(
path,options):Promise<InodeLike<number>>
Defined in: src/backends/passthrough.ts:107
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”Promise<InodeLike<number>>
Overrides
Section titled “Overrides”createFileSync()
Section titled “createFileSync()”createFileSync(
path,options):InodeLike
Defined in: src/backends/passthrough.ts:118
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”Overrides
Section titled “Overrides”exists()
Section titled “exists()”exists(
path):Promise<boolean>
Defined in: src/internal/filesystem.ts:257
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”existsSync()
Section titled “existsSync()”existsSync(
path):boolean
Defined in: src/internal/filesystem.ts:269
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ioctl()
Section titled “ioctl()”ioctl(
context,command, …args):Promise<any>
Defined in: src/internal/filesystem.ts:365
Internal
Parameters
Section titled “Parameters”context
Section titled “context”IoctlContext
command
Section titled “command”number
…any[]
Returns
Section titled “Returns”Promise<any>
Inherited from
Section titled “Inherited from”ioctlSync()
Section titled “ioctlSync()”ioctlSync(
context,command, …args):any
Defined in: src/internal/filesystem.ts:373
Internal
Parameters
Section titled “Parameters”context
Section titled “context”IoctlContext
command
Section titled “command”number
…any[]
Returns
Section titled “Returns”any
Inherited from
Section titled “Inherited from”link()
Section titled “link()”link(
target,link):Promise<void>
Defined in: src/backends/passthrough.ts:144
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”linkSync()
Section titled “linkSync()”linkSync(
target,link):void
Defined in: src/backends/passthrough.ts:148
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”mkdir()
Section titled “mkdir()”mkdir(
path,options):Promise<InodeLike<number>>
Defined in: src/backends/passthrough.ts:89
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”Promise<InodeLike<number>>
Overrides
Section titled “Overrides”mkdirSync()
Section titled “mkdirSync()”mkdirSync(
path,options):InodeLike
Defined in: src/backends/passthrough.ts:94
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”Overrides
Section titled “Overrides”path()
Section titled “path()”path(
path):string
Defined in: src/backends/passthrough.ts:34
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
read()
Section titled “read()”read(
path,buffer,offset,end):Promise<void>
Defined in: src/backends/passthrough.ts:152
Reads into a buffer
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to read into. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
number
The position in the file to stop reading
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”readdir()
Section titled “readdir()”readdir(
path):Promise<string[]>
Defined in: src/backends/passthrough.ts:99
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string[]>
Overrides
Section titled “Overrides”readdirSync()
Section titled “readdirSync()”readdirSync(
path):string[]
Defined in: src/backends/passthrough.ts:103
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
Overrides
Section titled “Overrides”readSync()
Section titled “readSync()”readSync(
path,buffer,offset,end):void
Defined in: src/backends/passthrough.ts:157
Reads into a buffer
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to read into. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
number
The position in the file to stop reading
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”ready()
Section titled “ready()”ready():
Promise<void>
Defined in: src/internal/filesystem.ts:213
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”readySync()
Section titled “readySync()”readySync():
void
Defined in: src/internal/filesystem.ts:214
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”rename()
Section titled “rename()”rename(
oldPath,newPath):Promise<void>
Defined in: src/backends/passthrough.ts:38
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”renameSync()
Section titled “renameSync()”renameSync(
oldPath,newPath):void
Defined in: src/backends/passthrough.ts:42
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”rmdir()
Section titled “rmdir()”rmdir(
path):Promise<void>
Defined in: src/backends/passthrough.ts:128
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”rmdirSync()
Section titled “rmdirSync()”rmdirSync(
path):void
Defined in: src/backends/passthrough.ts:132
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”stat()
Section titled “stat()”stat(
path):Promise<InodeLike<number>>
Defined in: src/backends/passthrough.ts:46
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<InodeLike<number>>
Overrides
Section titled “Overrides”statSync()
Section titled “statSync()”statSync(
path):InodeLike
Defined in: src/backends/passthrough.ts:50
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”streamRead()
Section titled “streamRead()”streamRead(
path,options):ReadableStream
Defined in: src/internal/filesystem.ts:317
Read a file using a stream.
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”ReadableStream
Inherited from
Section titled “Inherited from”streamWrite()
Section titled “streamWrite()”streamWrite(
path,options):WritableStream
Defined in: src/internal/filesystem.ts:346
Write a file using stream.
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”WritableStream
Inherited from
Section titled “Inherited from”sync()
Section titled “sync()”sync():
Promise<void>
Defined in: src/backends/passthrough.ts:136
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”syncSync()
Section titled “syncSync()”syncSync():
void
Defined in: src/backends/passthrough.ts:140
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: src/internal/filesystem.ts:197
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”touch()
Section titled “touch()”touch(
path,metadata):Promise<void>
Defined in: src/backends/passthrough.ts:58
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”touchSync()
Section titled “touchSync()”touchSync(
path,metadata):void
Defined in: src/backends/passthrough.ts:72
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”unlink()
Section titled “unlink()”unlink(
path):Promise<void>
Defined in: src/backends/passthrough.ts:81
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”unlinkSync()
Section titled “unlinkSync()”unlinkSync(
path):void
Defined in: src/backends/passthrough.ts:85
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”usage()
Section titled “usage()”usage():
UsageInfo
Defined in: src/backends/passthrough.ts:26
Default implementation.
Returns
Section titled “Returns”Implement
Overrides
Section titled “Overrides”write()
Section titled “write()”write(
path,buffer,offset):Promise<void>
Defined in: src/backends/passthrough.ts:166
Writes a buffer to a file
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to write. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
The offset in the file to start writing
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”writeSync()
Section titled “writeSync()”writeSync(
path,buffer,offset):void
Defined in: src/backends/passthrough.ts:171
Writes a buffer to a file
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to write. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
The offset in the file to start writing
Returns
Section titled “Returns”void