Skip to content

File System Access API chunk store that is abstract-chunk-store compliant

License

Notifications You must be signed in to change notification settings

SocketDev/fs-access-chunk-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fs-access-chunk-store ci npm downloads javascript style guide

File System Access API chunk store that is abstract-chunk-store compliant

abstract chunk store

Install

npm install fs-access-chunk-store

Usage

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

About

File System Access API chunk store that is abstract-chunk-store compliant

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •