Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@tabcat/orbit-db-fsstore
Advanced tools
an orbit-db store representing a file system
IMPORTANT: The fsstore creates a root directory named '/r' and every path must be built ontop/contained inside of this!
npm install @tabcat/orbit-db-fsstore
check out ./test for more info
returns a new path by combining path and name
const newPath = fsstore.joinPath('/r/this/is/a', 'path')
// '/r/this/is/a/path'
returns a bool, true if path exists and false if not
const exists = fsstore.exists('/r/file1')
// true
returns the content type at path or undefined if path doesn't exist
const json = fsstore.content('/r')
// 'dir'
const json = fsstore.content('/r/file1')
// 'file'
returns the json data written at path or undefined if path doesn't exist
const json = fsstore.read('/r/file1')
// { hello: 'ipfs cid' }
return an array of all paths located under the path in the store state
const pathTree = fsstore.tree('/r/dir1')
// ['/r/dir1/file2', '/r/dir1/dir2', '/r/dir1/dir2/file2']
return an array of only paths located inside the path in the store state
const pathLs = fsstore.ls('/r/dir1')
// ['/r/dir1/file2', '/r/dir1/dir2']
makes a new directory at joinPath(path, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mkdir('/r', 'dir1')
removes an existing directory at path returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.rmdir('/r/dir1')
moves an existing directory at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mvdir('/r/dir1', '/r', 'dir2')
copies an existing directory at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.cpdir('/r/dir1', '/r', 'dir1')
make a new file at joinPath(path, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mk('/r', 'file1')
map json (any JSON-serializable value) to a file path (!!! do not store blob data in orbitdb, ONLY REFERENCES) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.write('/r/file1', { hello: 'ipfs cid' })
remove an existing file at path returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.rm('/r/file1')
move an existing file at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.mv('/r/file1', '/r', 'file2')
copy an existing file at path to joinPath(dest, name) returns a Promise that resolves to a String that is the multihash of the entry.
const entryHash = await fsstore.cp('/r/file1', '/r', 'file2')
FAQs
a custom orbit-db store representing a file system
The npm package @tabcat/orbit-db-fsstore receives a total of 0 weekly downloads. As such, @tabcat/orbit-db-fsstore popularity was classified as not popular.
We found that @tabcat/orbit-db-fsstore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.