1.1.0 • Published 4 years ago
fs-access-chunk-store v1.1.0
fs-access-chunk-store

File System Access API chunk store that is abstract-chunk-store compliant
Install
npm install fs-access-chunk-storeUsage
const fsAccessChunkStore = require('fs-access-chunk-store')
const chunks = fsAccessChunkStore(10)
chunks.put(0, new Buffer('01234567890'), function (err) {
if (err) throw err
chunks.get(0, function (err, chunk) {
if (err) throw err
console.log(chunk) // '01234567890' as a buffer
})
})Options
length: Total size of the chunk store (optional, default:Infinity)name: Top-level directory to create for this store (optional, default:default)rootDir: Root directory handle (optional, default:navigator.storage.getDirectory())
License
MIT. Copyright (c) Socket Inc