Interface FileSystemWritable

Readable & Writable interface for EncryptedFS

Hierarchy

Properties

access: {
    (path, mode?): Promise<void>;
    (path, callback): Promise<void>;
    (path, mode, callback): Promise<void>;
}

Type declaration

    • (path, mode?): Promise<void>
    • Parameters

      • path: Path
      • Optional mode: number

      Returns Promise<void>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback

      Returns Promise<void>

    • (path, mode, callback): Promise<void>
    • Parameters

      • path: Path
      • mode: number
      • callback: Callback

      Returns Promise<void>

appendFile: {
    (file, data, options?): Promise<void>;
    (file, data, callback): Promise<void>;
    (file, data, options, callback): Promise<void>;
}

Type declaration

    • (file, data, options?): Promise<void>
    • Parameters

      • file: Path | FdIndex
      • data: Data
      • Optional options: Options

      Returns Promise<void>

    • (file, data, callback): Promise<void>
    • Parameters

      • file: Path | FdIndex
      • data: Data
      • callback: Callback

      Returns Promise<void>

    • (file, data, options, callback): Promise<void>
    • Parameters

      • file: Path | FdIndex
      • data: Data
      • options: Options
      • callback: Callback

      Returns Promise<void>

chmod: ((path, mode, callback?) => Promise<void>)

Type declaration

    • (path, mode, callback?): Promise<void>
    • Parameters

      • path: Path
      • mode: number
      • Optional callback: Callback

      Returns Promise<void>

chown: ((path, uid, gid, callback?) => Promise<void>)

Type declaration

    • (path, uid, gid, callback?): Promise<void>
    • Parameters

      • path: Path
      • uid: number
      • gid: number
      • Optional callback: Callback

      Returns Promise<void>

chownr: ((path, uid, gid, callback?) => Promise<void>)

Type declaration

    • (path, uid, gid, callback?): Promise<void>
    • Parameters

      • path: Path
      • uid: number
      • gid: number
      • Optional callback: Callback

      Returns Promise<void>

close: ((fdIndex, callback?) => Promise<void>)

Type declaration

    • (fdIndex, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • Optional callback: Callback

      Returns Promise<void>

constants: __module
copyFile: {
    (srcPath, dstPath, flags?): Promise<void>;
    (srcPath, dstPath, callback): Promise<void>;
    (srcPath, dstPath, flags, callback): Promise<void>;
}

Type declaration

    • (srcPath, dstPath, flags?): Promise<void>
    • Parameters

      • srcPath: Path
      • dstPath: Path
      • Optional flags: number

      Returns Promise<void>

    • (srcPath, dstPath, callback): Promise<void>
    • Parameters

      • srcPath: Path
      • dstPath: Path
      • callback: Callback

      Returns Promise<void>

    • (srcPath, dstPath, flags, callback): Promise<void>
    • Parameters

      • srcPath: Path
      • dstPath: Path
      • flags: number
      • callback: Callback

      Returns Promise<void>

createReadStream: ((path, options?) => ReadStream)

Type declaration

    • (path, options?): ReadStream
    • Parameters

      • path: Path
      • Optional options: OptionsStream

      Returns ReadStream

createWriteStream: ((path, options?) => WriteStream)

Type declaration

    • (path, options?): WriteStream
    • Parameters

      • path: Path
      • Optional options: OptionsStream

      Returns WriteStream

exists: ((path, callback?) => Promise<boolean | void>)

Type declaration

    • (path, callback?): Promise<boolean | void>
    • Parameters

      • path: Path
      • Optional callback: Callback<[boolean]>

      Returns Promise<boolean | void>

fallocate: ((fdIndex, offset, len, callback?) => Promise<void>)

Type declaration

    • (fdIndex, offset, len, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • offset: number
      • len: number
      • Optional callback: Callback

      Returns Promise<void>

fchmod: ((fdIndex, mode, callback?) => Promise<void>)

Type declaration

    • (fdIndex, mode, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • mode: number
      • Optional callback: Callback

      Returns Promise<void>

fchown: ((fdIndex, uid, gid, callback?) => Promise<void>)

Type declaration

    • (fdIndex, uid, gid, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • uid: number
      • gid: number
      • Optional callback: Callback

      Returns Promise<void>

fdatasync: ((fdIndex, callback?) => Promise<void>)

Type declaration

    • (fdIndex, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • Optional callback: Callback

      Returns Promise<void>

fstat: {
    (fdIndex): Promise<Stat>;
    (fdIndex, callback): Promise<void>;
}

Type declaration

    • (fdIndex): Promise<Stat>
    • Parameters

      • fdIndex: FdIndex

      Returns Promise<Stat>

    • (fdIndex, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • callback: Callback<[Stat]>

      Returns Promise<void>

fsync: ((fdIndex, callback?) => Promise<void>)

Type declaration

    • (fdIndex, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • Optional callback: Callback

      Returns Promise<void>

ftruncate: {
    (fdIndex, len?): Promise<void>;
    (fdIndex, callback): Promise<void>;
    (fdIndex, len, callback): Promise<void>;
}

Type declaration

    • (fdIndex, len?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • Optional len: number

      Returns Promise<void>

    • (fdIndex, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • callback: Callback

      Returns Promise<void>

    • (fdIndex, len, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • len: number
      • callback: Callback

      Returns Promise<void>

futimes: ((fdIndex, atime, mtime, callback?) => Promise<void>)

Type declaration

    • (fdIndex, atime, mtime, callback?): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • atime: string | number | Date
      • mtime: string | number | Date
      • Optional callback: Callback

      Returns Promise<void>

lchmod: ((path, mode, callback?) => Promise<void>)

Type declaration

    • (path, mode, callback?): Promise<void>
    • Parameters

      • path: Path
      • mode: number
      • Optional callback: Callback

      Returns Promise<void>

lchown: ((path, uid, gid, callback?) => Promise<void>)

Type declaration

    • (path, uid, gid, callback?): Promise<void>
    • Parameters

      • path: Path
      • uid: number
      • gid: number
      • Optional callback: Callback

      Returns Promise<void>

link: ((existingPath, newPath, callback?) => Promise<void>)

Type declaration

    • (existingPath, newPath, callback?): Promise<void>
    • Parameters

      • existingPath: Path
      • newPath: Path
      • Optional callback: Callback

      Returns Promise<void>

lseek: {
    (fdIndex, position, seekFlags?): Promise<number>;
    (fdIndex, position, callback): Promise<void>;
    (fdIndex, position, seekFlags, callback): Promise<void>;
}

Type declaration

    • (fdIndex, position, seekFlags?): Promise<number>
    • Parameters

      • fdIndex: FdIndex
      • position: number
      • Optional seekFlags: number

      Returns Promise<number>

    • (fdIndex, position, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • position: number
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, position, seekFlags, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • position: number
      • seekFlags: number
      • callback: Callback<[number]>

      Returns Promise<void>

lstat: {
    (path): Promise<Stat>;
    (path, callback): Promise<void>;
}

Type declaration

    • (path): Promise<Stat>
    • Parameters

      • path: Path

      Returns Promise<Stat>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback<[Stat]>

      Returns Promise<void>

mkdir: {
    (path, options?): Promise<void>;
    (path, callback): Promise<void>;
    (path, options, callback): Promise<void>;
}

Type declaration

    • (path, options?): Promise<void>
    • Makes a directory

      This call must handle concurrent races to create the directory inode

      Parameters

      • path: Path
      • Optional options: number | Options

      Returns Promise<void>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback

      Returns Promise<void>

    • (path, options, callback): Promise<void>
    • Parameters

      • path: Path
      • options: number | Options
      • callback: Callback

      Returns Promise<void>

mkdtemp: {
    (pathSPrefix, options?): Promise<string | Buffer>;
    (pathSPrefix, callback): Promise<void>;
    (pathSPrefix, options, callback): Promise<void>;
}

Type declaration

    • (pathSPrefix, options?): Promise<string | Buffer>
    • Parameters

      • pathSPrefix: string
      • Optional options: Options

      Returns Promise<string | Buffer>

    • (pathSPrefix, callback): Promise<void>
    • Parameters

      • pathSPrefix: string
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

    • (pathSPrefix, options, callback): Promise<void>
    • Parameters

      • pathSPrefix: string
      • options: Options
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

mknod: {
    (path, type, major, minor, mode?): Promise<void>;
    (path, type, major, minor, callback): Promise<void>;
    (path, type, major, minor, mode, callback): Promise<void>;
}

Type declaration

    • (path, type, major, minor, mode?): Promise<void>
    • Makes an inode

      This call must handle concurrent races to create the inode

      Parameters

      • path: Path
      • type: number
      • major: number
      • minor: number
      • Optional mode: number

      Returns Promise<void>

    • (path, type, major, minor, callback): Promise<void>
    • Parameters

      • path: Path
      • type: number
      • major: number
      • minor: number
      • callback: Callback

      Returns Promise<void>

    • (path, type, major, minor, mode, callback): Promise<void>
    • Parameters

      • path: Path
      • type: number
      • major: number
      • minor: number
      • mode: number
      • callback: Callback

      Returns Promise<void>

open: {
    (path, flags, mode?): Promise<FdIndex>;
    (path, flags, callback): Promise<void>;
    (path, flags, mode, callback): Promise<void>;
}

Type declaration

    • (path, flags, mode?): Promise<FdIndex>
    • Parameters

      • path: Path
      • flags: string | number
      • Optional mode: number

      Returns Promise<FdIndex>

    • (path, flags, callback): Promise<void>
    • Parameters

      • path: Path
      • flags: string | number
      • callback: Callback<[FdIndex]>

      Returns Promise<void>

    • (path, flags, mode, callback): Promise<void>
    • Parameters

      • path: Path
      • flags: string | number
      • mode: number
      • callback: Callback<[FdIndex]>

      Returns Promise<void>

read: {
    (fdIndex, buffer, offset?, length?, position?): Promise<number>;
    (fdIndex, buffer, callback): Promise<void>;
    (fdIndex, buffer, offset, callback): Promise<void>;
    (fdIndex, buffer, offset, length, callback): Promise<void>;
    (fdIndex, buffer, offset, length, position, callback): Promise<void>;
}

Type declaration

    • (fdIndex, buffer, offset?, length?, position?): Promise<number>
    • Parameters

      • fdIndex: FdIndex
      • buffer: Data
      • Optional offset: number
      • Optional length: number
      • Optional position: number

      Returns Promise<number>

    • (fdIndex, buffer, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • buffer: Data
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, buffer, offset, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • buffer: Data
      • offset: number
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, buffer, offset, length, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • buffer: Data
      • offset: number
      • length: number
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, buffer, offset, length, position, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • buffer: Data
      • offset: number
      • length: number
      • position: number
      • callback: Callback<[number]>

      Returns Promise<void>

readFile: {
    (file, options?): Promise<string | Buffer>;
    (file, callback): Promise<void>;
    (file, options, callback): Promise<void>;
}

Type declaration

    • (file, options?): Promise<string | Buffer>
    • Parameters

      • file: File
      • Optional options: Options

      Returns Promise<string | Buffer>

    • (file, callback): Promise<void>
    • Parameters

      • file: File
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

    • (file, options, callback): Promise<void>
    • Parameters

      • file: File
      • options: Options
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

readdir: {
    (path, options?): Promise<(string | Buffer)[]>;
    (path, callback): Promise<void>;
    (path, options, callback): Promise<void>;
}

Type declaration

    • (path, options?): Promise<(string | Buffer)[]>
    • Parameters

      • path: Path
      • Optional options: Options

      Returns Promise<(string | Buffer)[]>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback<[(string | Buffer)[]]>

      Returns Promise<void>

    • (path, options, callback): Promise<void>
    • Parameters

      • path: Path
      • options: Options
      • callback: Callback<[(string | Buffer)[]]>

      Returns Promise<void>

readlink: {
    (path, options?): Promise<string | Buffer>;
    (path, callback): Promise<void>;
    (path, options, callback): Promise<void>;
}

Type declaration

    • (path, options?): Promise<string | Buffer>
    • Parameters

      • path: Path
      • Optional options: Options

      Returns Promise<string | Buffer>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

    • (path, options, callback): Promise<void>
    • Parameters

      • path: Path
      • options: Options
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

realpath: {
    (path, options?): Promise<string | Buffer>;
    (path, callback): Promise<void>;
    (path, options, callback): Promise<void>;
}

Type declaration

    • (path, options?): Promise<string | Buffer>
    • Parameters

      • path: Path
      • Optional options: Options

      Returns Promise<string | Buffer>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

    • (path, options, callback): Promise<void>
    • Parameters

      • path: Path
      • options: Options
      • callback: Callback<[string | Buffer]>

      Returns Promise<void>

rename: ((oldPath, newPath, callback?) => Promise<void>)

Type declaration

    • (oldPath, newPath, callback?): Promise<void>
    • Parameters

      • oldPath: Path
      • newPath: Path
      • Optional callback: Callback

      Returns Promise<void>

rmdir: {
    (path, options?): Promise<void>;
    (path, callback): Promise<void>;
    (path, options, callback): Promise<void>;
}

Type declaration

    • (path, options?): Promise<void>
    • Parameters

      • path: Path
      • Optional options: Options

      Returns Promise<void>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback

      Returns Promise<void>

    • (path, options, callback): Promise<void>
    • Parameters

      • path: Path
      • options: Options
      • callback: Callback

      Returns Promise<void>

stat: {
    (path): Promise<Stat>;
    (path, callback): Promise<void>;
}

Type declaration

    • (path): Promise<Stat>
    • Parameters

      • path: Path

      Returns Promise<Stat>

    • (path, callback): Promise<void>
    • Parameters

      • path: Path
      • callback: Callback<[Stat]>

      Returns Promise<void>

symlink: {
    (dstPath, srcPath, type?): Promise<void>;
    (dstPath, srcPath, callback): Promise<void>;
    (dstPath, srcPath, type, callback): Promise<void>;
}

Type declaration

    • (dstPath, srcPath, type?): Promise<void>
    • Makes a symlink

      This call must handle concurrent races to create the symlink inode

      Parameters

      • dstPath: Path
      • srcPath: Path
      • Optional type: string

      Returns Promise<void>

    • (dstPath, srcPath, callback): Promise<void>
    • Parameters

      • dstPath: Path
      • srcPath: Path
      • callback: Callback

      Returns Promise<void>

    • (dstPath, srcPath, type, callback): Promise<void>
    • Parameters

      • dstPath: Path
      • srcPath: Path
      • type: string
      • callback: Callback

      Returns Promise<void>

truncate: {
    (file, len?): Promise<void>;
    (file, callback): Promise<void>;
    (file, len, callback): Promise<void>;
}

Type declaration

    • (file, len?): Promise<void>
    • Parameters

      • file: File
      • Optional len: number

      Returns Promise<void>

    • (file, callback): Promise<void>
    • Parameters

      • file: File
      • callback: Callback

      Returns Promise<void>

    • (file, len, callback): Promise<void>
    • Parameters

      • file: File
      • len: number
      • callback: Callback

      Returns Promise<void>

unlink: ((path, callback?) => Promise<void>)

Type declaration

    • (path, callback?): Promise<void>
    • Parameters

      • path: Path
      • Optional callback: Callback

      Returns Promise<void>

utimes: ((path, atime, mtime, callback?) => Promise<void>)

Type declaration

    • (path, atime, mtime, callback?): Promise<void>
    • Parameters

      • path: Path
      • atime: string | number | Date
      • mtime: string | number | Date
      • Optional callback: Callback

      Returns Promise<void>

write: {
    (fdIndex, data, offsetOrPos?, lengthOrEncoding?, position?): Promise<number>;
    (fdIndex, data, callback): Promise<void>;
    (fdIndex, data, offsetOrPos, callback): Promise<void>;
    (fdIndex, data, offsetOrPos, lengthOrEncoding, callback): Promise<void>;
    (fdIndex, data, offsetOrPos, lengthOrEncoding, position, callback): Promise<void>;
}

Type declaration

    • (fdIndex, data, offsetOrPos?, lengthOrEncoding?, position?): Promise<number>
    • Parameters

      • fdIndex: FdIndex
      • data: Data
      • Optional offsetOrPos: number
      • Optional lengthOrEncoding: string | number
      • Optional position: number

      Returns Promise<number>

    • (fdIndex, data, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • data: Data
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, data, offsetOrPos, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • data: Data
      • offsetOrPos: number
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, data, offsetOrPos, lengthOrEncoding, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • data: Data
      • offsetOrPos: number
      • lengthOrEncoding: string | number
      • callback: Callback<[number]>

      Returns Promise<void>

    • (fdIndex, data, offsetOrPos, lengthOrEncoding, position, callback): Promise<void>
    • Parameters

      • fdIndex: FdIndex
      • data: Data
      • offsetOrPos: number
      • lengthOrEncoding: string | number
      • position: number
      • callback: Callback<[number]>

      Returns Promise<void>

writeFile: {
    (file, data?, options?): Promise<void>;
    (file, data, callback): Promise<void>;
    (file, data, options, callback): Promise<void>;
}

Type declaration

    • (file, data?, options?): Promise<void>
    • Parameters

      • file: File
      • Optional data: Data
      • Optional options: Options

      Returns Promise<void>

    • (file, data, callback): Promise<void>
    • Parameters

      • file: File
      • data: Data
      • callback: Callback

      Returns Promise<void>

    • (file, data, options, callback): Promise<void>
    • Parameters

      • file: File
      • data: Data
      • options: Options
      • callback: Callback

      Returns Promise<void>

Generated using TypeDoc