IndexedDB API reference
Exports of @anymux/indexeddb. Back to the module
Classes
IndexedDBFileSystem
classclass IndexedDBFileSystem
promises
propertypromises: this
constants
propertyconstants: FSConstants
constructor
constructorconstructor(config?: Partial<IndexedDBConfig>): IndexedDBFileSystem
init
methodinit(): Promise<void>
isImplemented
methodisImplemented(method: string): boolean
readFile
methodreadFile(path: string, options?: { encoding?: BufferEncoding; flag?: string; } | BufferEncoding): Promise<Buffer | string>writeFile
methodwriteFile(path: string, data: Buffer | string | Uint8Array, options?: { encoding?: BufferEncoding; mode?: number; flag?: string; }): Promise<void>appendFile
methodappendFile(path: string, data: Buffer | string | Uint8Array, options?: { encoding?: BufferEncoding; mode?: number; flag?: string; }): Promise<void>copyFile
methodcopyFile(src: string, dest: string, mode?: number): Promise<void>
mkdir
methodmkdir(path: string, options?: { recursive?: boolean; mode?: number; }): Promise<string | undefined>readdir
methodreaddir(path: string, options?: { encoding?: BufferEncoding; withFileTypes?: false; recursive?: boolean; }): Promise<string[]>readdir
methodreaddir(path: string, options: { encoding?: BufferEncoding; withFileTypes: true; recursive?: boolean; }): Promise<Dirent[]>readdir
methodreaddir(path: string, options?: { encoding?: BufferEncoding; withFileTypes?: boolean; recursive?: boolean; }): Promise<string[] | Dirent[]>rmdir
methodrmdir(path: string, options?: { maxRetries?: number; recursive?: boolean; retryDelay?: number; }): Promise<void>stat
methodstat(path: string, options?: { bigint?: false; }): Promise<Stats>stat
methodstat(path: string, options: { bigint: true; }): Promise<BigIntStats>stat
methodstat(path: string, options?: { bigint?: boolean; }): Promise<Stats | BigIntStats>lstat
methodlstat(path: string, options?: { bigint?: false; }): Promise<Stats>lstat
methodlstat(path: string, options: { bigint: true; }): Promise<BigIntStats>lstat
methodlstat(path: string, options?: { bigint?: boolean; }): Promise<Stats | BigIntStats>access
methodaccess(path: string, mode?: number): Promise<void>
rename
methodrename(oldPath: string, newPath: string): Promise<void>
unlink
methodunlink(path: string): Promise<void>
rm
methodrm(path: string, options?: { force?: boolean; maxRetries?: number; recursive?: boolean; retryDelay?: number; }): Promise<void>exists
methodexists(path: string): Promise<boolean>
truncate
methodtruncate(path: string, len?: number): Promise<void>
utimes
methodutimes(path: string, atime: string | number | Date, mtime: string | number | Date): Promise<void>
chmod
methodchmod(path: string, mode: string | number): Promise<void>
chown
methodchown(path: string, uid: number, gid: number): Promise<void>
readlink
methodreadlink(path: string, options?: { encoding?: BufferEncoding; }): Promise<string>symlink
methodsymlink(target: string, path: string, type?: "dir" | "file" | "junction"): Promise<void>
link
methodlink(existingPath: string, newPath: string): Promise<void>
createReadStream
methodcreateReadStream(path: string, options?: { encoding?: BufferEncoding; start?: number; end?: number; }): ReadStreamcreateWriteStream
methodcreateWriteStream(path: string, options?: { encoding?: BufferEncoding; flags?: string; mode?: number; }): WriteStreamwatch
methodwatch(path: string, options?: { encoding?: BufferEncoding; persistent?: boolean; recursive?: boolean; }): FSWatcheropen
methodopen(path: string, flags?: string | number, mode?: number): Promise<IFileHandle>
opendir
methodopendir(path: string, options?: { encoding?: BufferEncoding; bufferSize?: number; recursive?: boolean; }): Promise<IDir>realpath
methodrealpath(path: string, options?: { encoding?: BufferEncoding; }): Promise<string>cp
methodcp(src: string, dest: string, options?: any): Promise<void>
mkdtemp
methodmkdtemp(prefix: string, options?: { encoding?: BufferEncoding; }): Promise<string>statfs
methodstatfs(path: string, options?: { bigint?: false; }): Promise<StatFs>statfs
methodstatfs(path: string, options: { bigint: true; }): Promise<BigIntStatFs>statfs
methodstatfs(_path: string, _options?: { bigint?: boolean; }): Promise<StatFs | BigIntStatFs>lutimes
methodlutimes(path: string, atime: string | number | Date, mtime: string | number | Date): Promise<void>
lchown
methodlchown(path: string, uid: number, gid: number): Promise<void>
lchmod
methodlchmod(path: string, mode: string | number): Promise<void>
Types
IndexedDBConfig
typetype IndexedDBConfig = { dbName?: string; storeName?: string; version?: number; }Constants
IndexedDBConfigSchema
constconst IndexedDBConfigSchema: z.ZodObject<{ dbName: z.ZodDefault<z.ZodString>; storeName: z.ZodDefault<z.ZodString>; version: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { dbName?: string; storeName?: string; version?: number; }, { dbName?: string; storeName?: string; version?: number; }>