Interface SQLiteVFS

SQLite Virtual File System object

Objects with this interface can be passed to SQLiteAPI.vfs_register to define a new filesystem.

There are examples of a synchronous MemoryVFS.js, and asynchronous MemoryAsyncVFS.js and IndexedDbVFS.js.

interface SQLiteVFS {
    mxPathName?: number;
    xAccess(pVfs, zName, flags, pResOut): number | Promise<number>;
    xCheckReservedLock(fileId, pResOut): number | Promise<number>;
    xClose(fileId): number | Promise<number>;
    xDelete(pVfs, zName, syncDir): number | Promise<number>;
    xDeviceCharacteristics(fileId): number | Promise<number>;
    xFileControl(fileId, flags, pOut): number | Promise<number>;
    xFileSize(fileId, pSize64): number | Promise<number>;
    xLock(fileId, flags): number | Promise<number>;
    xOpen(pVfs, zName, pFile, flags, pOutFlags): number | Promise<number>;
    xRead(fileId, pData, iAmt, iOffsetLo, iOffsetHi): number | Promise<number>;
    xSync(fileId, flags): number | Promise<number>;
    xTruncate(fileId, iSizeLo, iSizeHi): number | Promise<number>;
    xUnlock(fileId, flags): number | Promise<number>;
    xWrite(fileId, pData, iAmt, iOffsetLo, iOffsetHi): number | Promise<number>;
}

Properties

mxPathName?: number

Maximum length of a file path in UTF-8 bytes (default 64)

Methods

  • Parameters

    • pVfs: number
    • zName: number
    • flags: number
    • pResOut: number

    Returns number | Promise<number>

  • Parameters

    • pVfs: number
    • zName: number
    • syncDir: number

    Returns number | Promise<number>

  • Parameters

    • pVfs: number
    • zName: number
    • pFile: number
    • flags: number
    • pOutFlags: number

    Returns number | Promise<number>

  • Parameters

    • fileId: number
    • pData: number
    • iAmt: number
    • iOffsetLo: number
    • iOffsetHi: number

    Returns number | Promise<number>

  • Parameters

    • fileId: number
    • pData: number
    • iAmt: number
    • iOffsetLo: number
    • iOffsetHi: number

    Returns number | Promise<number>

Generated using TypeDoc