项目作者: AraBlocks

项目描述 :
The Conflict-Free File System Network
高级语言: JavaScript
项目地址: git://github.com/AraBlocks/cfsnet.git
创建时间: 2018-05-09T15:24:13Z
项目社区:https://github.com/AraBlocks/cfsnet

开源协议:MIT License

下载


CFSNET

Abstract

The Conflict-Free File System Network, or CFSNET, is a distributed,
decentralized, and peer-to-peer system for securely authoring, tracking,
and replicating content in self contained file system archives. This is
some what equivalent to how Linux file systems are distributed through Docker
containers and how the POSIX.1-1988 Tar file format represents archive files
as binary objects (Tarballs).

INSERT WHITE PAPER/TECHNICAL DOCUMENT LINK HERE

Summary

CFSNET creates a UNIX like file system implementing a subset of the
Filesystem Hierarchy Standard. CFSNET file systems are partitioned into
smaller Hyperdrive instances.

CFSNET builds on Hyperdrive in similar ways Dat has
built on it, but CFSNET overlays a POSIX like file system that is
partitioned into distinct Hyperdrive file systems that can be replicated
independently. The API is consistent with Hyperdrive while
exposing a Promise based API as well.

Status

This project is in active development.

Dependencies

  • Node
  • pkg-config (brew install pkg-config for Macos)

Installation

  1. $ npm install cfsnet

Example

  1. const { createCFS } = require('cfsnet/create')
  2. const id = 'my-file-system'
  3. const cfs = await createCFS({ id })
  4. // pipe file system events to stdout from `/var` partition
  5. cfs.createReadStream('/var/log/events', { live: true }).pipe(process.stdout)
  6. // write hello.txt to HOME
  7. await cfs.writeFile('./hello.txt', 'world') // will write to /home/hello.txt
  8. // read /home/hello.txt
  9. const buffer = await cfs.readFile('./hello.txt') // will read ./hello.txt
  10. // read HOME (~) directory
  11. console.log(await cfs.readdir('~/hello.txt'))

Contributing

See Also

License

MIT