Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Mounting read only /ipfs #2

Closed
4 tasks
jbenet opened this issue Jun 26, 2014 · 1 comment
Closed
4 tasks

Mounting read only /ipfs #2

jbenet opened this issue Jun 26, 2014 · 1 comment

Comments

@jbenet
Copy link
Member

jbenet commented Jun 26, 2014

Read only mounting works now:

in one term:

mkdir -p foo
echo "bar" > foo/bar
echo "baz" > foo/baz
# foo/baz: added block /XLM1ZETht3wv8vUPXMkx3JZGP5T9txAz782
# foo/bar: added block /XLMCA8WXBNRBwFhzRnHgHFLwGmQzkAQELH7
# foo: added tree /XLNUfxWCtidC125VaSgtM6yM1VRs7PcGvzq
ipfs add -r foo
ipfs mount /ipfs

in another:

# finding files by hash
cat /ipfs/XLMCA8WXBNRBwFhzRnHgHFLwGmQzkAQELH7
# bar
cat /ipfs/XLM1ZETht3wv8vUPXMkx3JZGP5T9txAz782
# baz

# listing directories
ls /ipfs
# ls: ipfs: Permission denied
ls -l /ipfs/XLNUfxWCtidC125VaSgtM6yM1VRs7PcGvzq
# -r--r--r--  0 root  wheel  4 Dec 31  1969 bar
# -r--r--r--  0 root  wheel  4 Dec 31  1969 baz

# path resolution
cat /ipfs/XLNUfxWCtidC125VaSgtM6yM1VRs7PcGvzq/bar
# bar
cat /ipfs/XLNUfxWCtidC125VaSgtM6yM1VRs7PcGvzq/baz
# baz

# symlinks work :)
ln -s /ipfs/XLNUfxWCtidC125VaSgtM6yM1VRs7PcGvzq foo
ls foo
# baz
# bar
cat foo/bar
# bar

wow, thanks unix :) ❤️

todo

  • service/daemonize
  • listing root shows things available locally
  • leveldb not re-entrant, so ipfs cli should check if a service is running.
  • mount subdirectories. e.g. ipfs mount <ipfs-path> <os-path>
@daviddias
Copy link
Member

Closing this issue as it referes to the 1st impl of node-ipfs that is no longer supported (as we are building the new one compliant with the spec :) ).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants