
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
fs-chunk-store
Advanced tools
Filesystem (fs) chunk store that is abstract-chunk-store compliant
npm install fs-chunk-store
var FSChunkStore = require('fs-chunk-store')
var chunks = new FSChunkStore(10, {
path: '/tmp/my_file', // optional: path to file (default: temp file will be used)
length: 100 // optional: file length in bytes (default: file expands based on `put`s)
})
var FSChunkStore = require('fs-chunk-store')
var chunks = new FSChunkStore(10, {
files: [
{ path: 'folder/file1.txt', length: 12 },
{ path: 'folder/file2.txt', length: 8 },
{ path: 'folder/file3.txt', length: 30 }
],
path: 'C:/user/' // optional: if specified the file paths will be treated as relative, not absolute
})
Specifying a path to the store will create a folder in that path, and on destroy, will delete the folder along with all it's contents
chunks.put(0, Buffer.from('0123456789'), function (err) {
if (err) throw err
chunks.get(0, function (err, chunk) {
if (err) throw err
console.log(chunk) // '0123456789' as a buffer
chunks.close(function (err) {
if (err) throw err
console.log('/tmp/my_file file descriptor is closed')
chunks.destroy(function (err) {
if (err) throw err
console.log('/tmp/my_file file is deleted')
})
})
})
})
MIT. Copyright (c) Feross Aboukhadijeh.
FAQs
Filesystem (fs) chunk store that is abstract-chunk-store compliant
The npm package fs-chunk-store receives a total of 0 weekly downloads. As such, fs-chunk-store popularity was classified as not popular.
We found that fs-chunk-store demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.