WebAccessFS
Defined in: src/access.ts:50
Internal
Consider supporting synchronous stuff with FileSystemFileHandle.createSyncAccessHandle()\
Extends
Section titled “Extends”AsyncMixin<this> &IndexFS<this>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WebAccessFS(
root,disableHandleCache?):WebAccessFS
Defined in: src/access.ts:110
Parameters
Section titled “Parameters”FileSystemDirectoryHandle
disableHandleCache?
Section titled “disableHandleCache?”boolean = false
Returns
Section titled “Returns”WebAccessFS
Overrides
Section titled “Overrides”Async(IndexFS).constructor
Properties
Section titled “Properties”_handles
Section titled “_handles”
protected_handles:Map<string,FileSystemHandle>
Defined in: src/access.ts:56
Used to speed up handle lookups. Without this, every lookup would be O(n) on the path length. With the cache, these become O(1) operations.
_mountPoint?
Section titled “_mountPoint?”
protectedoptional_mountPoint?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:143
Internal
The last place this file system was mounted
Inherited from
Section titled “Inherited from”Async(IndexFS)._mountPoint
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.
Inherited from
Section titled “Inherited from”Async(IndexFS)._uuid
attributes
Section titled “attributes”
readonlyattributes:ConstMap<FileSystemAttributes, keyofFileSystemAttributes,void|CaseFold|undefined> &Map<string,any>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:154
FileSystemAttributes
Inherited from
Section titled “Inherited from”Async(IndexFS).attributes
disableHandleCache
Section titled “disableHandleCache”
protectedreadonlydisableHandleCache:boolean=false
Defined in: src/access.ts:112
readonlyindex:Index
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:10
Inherited from
Section titled “Inherited from”Async(IndexFS).index
label?
Section titled “label?”
optionallabel?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:138
Inherited from
Section titled “Inherited from”Async(IndexFS).label
readonlyname: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
Inherited from
Section titled “Inherited from”Async(IndexFS).name
protectedreadonlyroot:FileSystemDirectoryHandle
Defined in: src/access.ts:111
readonlytype: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
Inherited from
Section titled “Inherited from”Async(IndexFS).type
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get uuid():
`${string}-${string}-${string}-${string}-${string}`
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:150
Returns
Section titled “Returns”`${string}-${string}-${string}-${string}-${string}`
Inherited from
Section titled “Inherited from”Async(IndexFS).uuid
Methods
Section titled “Methods”_mkdir()
Section titled “_mkdir()”_mkdir(
path):Promise<void>
Defined in: src/access.ts:272
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”Async(IndexFS)._mkdir
_mkdirSync()?
Section titled “_mkdirSync()?”
protectedoptional_mkdirSync(path,options):void
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:34
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS)._mkdirSync
_remove()
Section titled “_remove()”
protected_remove(path,isUnlink):void
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:23
Parameters
Section titled “Parameters”string
isUnlink
Section titled “isUnlink”boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS)._remove
create()
Section titled “create()”
protectedcreate(path,options):Inode
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:30
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”Async(IndexFS).create
createFile()
Section titled “createFile()”createFile(
path,options):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:31
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<Inode>
Inherited from
Section titled “Inherited from”Async(IndexFS).createFile
createFileSync()
Section titled “createFileSync()”Call Signature
Section titled “Call Signature”
abstractcreateFileSync(path,options):InodeLike
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:190
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”InodeLike
Inherited from
Section titled “Inherited from”Async(IndexFS).createFileSync
Call Signature
Section titled “Call Signature”
abstractcreateFileSync(path,options):Inode
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:32
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”Async(IndexFS).createFileSync
exists()
Section titled “exists()”exists(
path):Promise<boolean>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:202
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”Async(IndexFS).exists
existsSync()
Section titled “existsSync()”existsSync(
path):boolean
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:206
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Async(IndexFS).existsSync
protectedget<T>(kind?,path):Promise<HKindToType<T>>
Defined in: src/access.ts:278
Type Parameters
Section titled “Type Parameters”T extends FileSystemHandleKind | null
Parameters
Section titled “Parameters”T = ...
string
Returns
Section titled “Returns”Promise<HKindToType<T>>
link()
Section titled “link()”link(
target,link):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:37
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).link
linkSync()
Section titled “linkSync()”
abstractlinkSync(target,link):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:208
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).linkSync
mkdir()
Section titled “mkdir()”mkdir(
path,options):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:35
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<Inode>
Inherited from
Section titled “Inherited from”Async(IndexFS).mkdir
mkdirSync()
Section titled “mkdirSync()”Call Signature
Section titled “Call Signature”
abstractmkdirSync(path,options):InodeLike
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:196
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”InodeLike
Inherited from
Section titled “Inherited from”Async(IndexFS).mkdirSync
Call Signature
Section titled “Call Signature”
abstractmkdirSync(path,options):Inode
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:36
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”Async(IndexFS).mkdirSync
queueDone()
Section titled “queueDone()”queueDone():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:22
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).queueDone
read()
Section titled “read()”read(
path,buffer,offset,end):Promise<void>
Defined in: src/access.ts:195
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”Async(IndexFS).read
readdir()
Section titled “readdir()”readdir(
path):Promise<string[]>
Defined in: src/access.ts:179
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string[]>
Overrides
Section titled “Overrides”Async(IndexFS).readdir
readdirSync()
Section titled “readdirSync()”
abstractreaddirSync(path):string[]
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:198
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
Inherited from
Section titled “Inherited from”Async(IndexFS).readdirSync
readSync()
Section titled “readSync()”
abstractreadSync(path,buffer,start,end):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:224
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!
number
The offset into the file to start reading from
number
The position in the file to stop reading
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).readSync
ready()
Section titled “ready()”ready():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:23
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).ready
readySync()
Section titled “readySync()”readySync():
void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:174
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”remove()
Section titled “remove()”
protectedremove(path):Promise<void>
Defined in: src/access.ts:184
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”Async(IndexFS).remove
removeSync()
Section titled “removeSync()”
protectedremoveSync():void
Defined in: src/access.ts:191
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Async(IndexFS).removeSync
rename()
Section titled “rename()”rename(
oldPath,newPath):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:17
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).rename
renameSync()
Section titled “renameSync()”
abstractrenameSync(oldPath,newPath):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:176
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).renameSync
rmdir()
Section titled “rmdir()”rmdir(
path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:28
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).rmdir
rmdirSync()
Section titled “rmdirSync()”
abstractrmdirSync(path):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:194
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).rmdirSync
stat()
Section titled “stat()”stat(
path):Promise<Inode>
Defined in: src/access.ts:119
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Inode>
Overrides
Section titled “Overrides”Async(IndexFS).stat
statSync()
Section titled “statSync()”Call Signature
Section titled “Call Signature”
abstractstatSync(path):InodeLike
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:178
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”InodeLike
Inherited from
Section titled “Inherited from”Async(IndexFS).statSync
Call Signature
Section titled “Call Signature”
abstractstatSync(path):Inode
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:20
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”Async(IndexFS).statSync
streamRead()
Section titled “streamRead()”streamRead(
path,options):ReadableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:241
Read a file using a stream.
Parameters
Section titled “Parameters”string
options
Section titled “options”StreamOptions
Returns
Section titled “Returns”ReadableStream
Inherited from
Section titled “Inherited from”Async(IndexFS).streamRead
streamWrite()
Section titled “streamWrite()”streamWrite(
path,options):WritableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:246
Write a file using stream.
Parameters
Section titled “Parameters”string
options
Section titled “options”StreamOptions
Returns
Section titled “Returns”WritableStream
Inherited from
Section titled “Inherited from”Async(IndexFS).streamWrite
sync()
Section titled “sync()”sync():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:24
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).sync
syncSync()
Section titled “syncSync()”
abstractsyncSync():void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:210
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).syncSync
toString()
Section titled “toString()”toString():
string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:166
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Async(IndexFS).toString
touch()
Section titled “touch()”touch(
path,metadata):Promise<void>
Defined in: src/access.ts:152
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”InodeLike
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”Async(IndexFS).touch
touchSync()
Section titled “touchSync()”Call Signature
Section titled “Call Signature”
abstracttouchSync(path,metadata):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:182
Modify metadata.
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”Partial<InodeLike>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).touchSync
Call Signature
Section titled “Call Signature”
abstracttouchSync(path,metadata):void
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:22
Modify metadata.
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”InodeLike
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).touchSync
unlink()
Section titled “unlink()”unlink(
path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:26
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Async(IndexFS).unlink
unlinkSync()
Section titled “unlinkSync()”
abstractunlinkSync(path):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:192
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Async(IndexFS).unlinkSync
usage()
Section titled “usage()”usage():
UsageInfo
Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:12
Default implementation.
Returns
Section titled “Returns”UsageInfo
Implement
Inherited from
Section titled “Inherited from”Async(IndexFS).usage
write()
Section titled “write()”write(
path,buffer,offset):Promise<void>
Defined in: src/access.ts:217
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”Async(IndexFS).write
writeSync()
Section titled “writeSync()”
abstractwriteSync(path,buffer,offset):void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:236
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
Inherited from
Section titled “Inherited from”Async(IndexFS).writeSync