@cryptotaxi247 / kubo / commits / 3e6905e8b

core/commands/unixfs: Rename 'ipfs unixfs' to 'ipfs file'

To be less confusing to newcomers (the IPFS filesystem isn't Unix-specific anyway, and it isn't even very POSIX-specific [1,2,3]). I'm a bit uncertain about having one name for users and another for devs, but the consensus seems to be that mainaining two names is worth the trouble [4]. We also kicked around: * 'files' (plural), * 'filesystem' (too long), and * 'fs' (redundant after 'ipfs', even though IPFS isn't just about filesystems) on IRC [5 through 6]. I wish there was a more evocative term. I'm never sure where "file" lands on the scale between "filesysytem", "everything is a file", "a single chunk of data with an associated inode". But we can't think of anything better. [1]: https://github.com/ipfs/go-ipfs/pull/1348#issuecomment-110529070 [2]: https://github.com/ipfs/go-ipfs/pull/1348#issuecomment-110529921 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29377283 In my response to this (no longer visibile on GitHub): On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote: > > +package fsnode > > i think this package should be called `unixfs` as that's the > abstraction that this is calling to. Will do, although I don't see what's especially Unix-y about these file nodes. [4]: https://github.com/ipfs/go-ipfs/pull/1348#issuecomment-110529811 [5]: https://botbot.me/freenode/ipfs/2015-06-09/?msg=41428456&page=5 [6]: https://botbot.me/freenode/ipfs/2015-06-09/?msg=41430703&page=5 License: MIT Signed-off-by: W. Trevor King <wking@tremily.us>

W. Trevor King committed Jun 9, 2015 at 16:21 UTC 3e6905e8bae04485f05525e853cb1c9945b69e8f
3 files changed +11 -11
core/commands/root.go
+2 -2
@@ -36,7 +36,7 @@ DATA STRUCTURE COMMANDS
36
37 block Interact with raw blocks in the datastore
38 object Interact with raw dag nodes
39 - unixfs Interact with Unix filesystem objects
39 + file Interact with Unix filesystem objects
40
41 ADVANCED COMMANDS
42
@@ -104,7 +104,7 @@ var rootSubcommands = map[string]*cmds.Command{
104 "stats": StatsCmd,
105 "swarm": SwarmCmd,
106 "tour": tourCmd,
107 - "unixfs": unixfs.UnixFSCmd,
107 + "file": unixfs.UnixFSCmd,
108 "update": UpdateCmd,
109 "version": VersionCmd,
110 "bitswap": BitswapCmd,
core/commands/unixfs/unixfs.go
+2 -2
@@ -6,12 +6,12 @@ var UnixFSCmd = &cmds.Command{
6 Helptext: cmds.HelpText{
7 Tagline: "Interact with ipfs objects representing Unix filesystems",
8 ShortDescription: `
9 -'ipfs unixfs' provides a familar interface to filesystems represtented
9 +'ipfs file' provides a familar interface to filesystems represtented
10 by IPFS objects that hides IPFS-implementation details like layout
11 objects (e.g. fanout and chunking).
12 `,
13 Synopsis: `
14 -ipfs unixfs ls <path>... - List directory contents for <path>...
14 +ipfs file ls <path>... - List directory contents for <path>...
15 `,
16 },
17
test/sharness/t0200-unixfs-ls.sh
+7 -7
@@ -4,7 +4,7 @@
4 # MIT Licensed; see the LICENSE file in this repository.
5 #
6
7 -test_description="Test unixfs ls command"
7 +test_description="Test file ls command"
8
9 . lib/test-lib.sh
10
@@ -38,11 +38,11 @@ test_ls_cmd() {
38 test_cmp expected_add actual_add
39 '
40
41 - test_expect_success "'ipfs unixfs ls <three dir hashes>' succeeds" '
42 - ipfs unixfs ls QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss >actual_ls
41 + test_expect_success "'ipfs file ls <three dir hashes>' succeeds" '
42 + ipfs file ls QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss >actual_ls
43 '
44
45 - test_expect_success "'ipfs unixfs ls <three dir hashes>' output looks good" '
45 + test_expect_success "'ipfs file ls <three dir hashes>' output looks good" '
46 cat <<-\EOF >expected_ls &&
47 QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj:
48 d1
@@ -61,11 +61,11 @@ test_ls_cmd() {
61 test_cmp expected_ls actual_ls
62 '
63
64 - test_expect_success "'ipfs unixfs ls <file hashes>' succeeds" '
65 - ipfs unixfs ls /ipfs/QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy/1024 QmQNd6ubRXaNG6Prov8o6vk3bn6eWsj9FxLGrAVDUAGkGe >actual_ls_file
64 + test_expect_success "'ipfs file ls <file hashes>' succeeds" '
65 + ipfs file ls /ipfs/QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy/1024 QmQNd6ubRXaNG6Prov8o6vk3bn6eWsj9FxLGrAVDUAGkGe >actual_ls_file
66 '
67
68 - test_expect_success "'ipfs unixfs ls <file hashes>' output looks good" '
68 + test_expect_success "'ipfs file ls <file hashes>' output looks good" '
69 cat <<-\EOF >expected_ls_file &&
70 /ipfs/QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy/1024
71 QmQNd6ubRXaNG6Prov8o6vk3bn6eWsj9FxLGrAVDUAGkGe