wnfs-sync

module
v0.0.0-...-5b37609 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2021 License: GPL-3.0

README

wnfs-sync

demo

demo CLI application to syncronize a local filesystem directory to a public web-native file system directory.

# get this binary, assumes you have go & make installed
$ git clone https://github.com/b5/wnfs-sync.git
$ cd wnfs-sync && go mod tidy && make install

# set a place for wnfs to store the root hash of it's filesystem on IPFS
$ export WNFS_STATE_PATH="${HOME}/wnfs.json"
# optional: set a place to read ipfs from
$ export IPFS_PATH="${HOME}/.ipfs"

$ mkdir sync_example && cd sync_example
$ wnfs-sync init

# make a change:
$ echo "oh hai" > hai.txt

# this'll show a dirty local tree:
$ wnfs-sync status

# commit changes:
$ wnfs-sync commit

# more changes
$ echo "such change" > hai.txt
$ echo "such addition" > bye.txt
# commit
$ wnfs-sync commit

# this'll show no changes:
$ wnfs-sync status
# show contents of wnfs:
$ wnfs-sync tree

# read from wnfs:
$ wnfs-sync cat public/sync_example/hai.txt
# "such change"
Development Status: Work-In-Progress

This repo is very much a work-in-progress, and doesn't yet produce proper WNFS data. Don't rely on this.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL