Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No strict distinction between "files" and "directories" #2

Open
hassy opened this issue Oct 24, 2009 · 1 comment
Open

No strict distinction between "files" and "directories" #2

hassy opened this issue Oct 24, 2009 · 1 comment

Comments

@hassy
Copy link
Contributor

hassy commented Oct 24, 2009

It's possible to create a file and a directory with the same name. The key does not show up in op pairs/keys when there's a directory with the same name. rm'ing the key removes the directory too.

Is this intentional?

URL with("http://localhost:8080/dir?action=mkdir") fetch
// ==> null
URL with("http://localhost:8080/?action=write&key=dir") post ("dir_val")
// ==> null
// Can read the key "dir" now:
URL with("http://localhost:8080/?action=read&key=dir") fetch
// ==> "dir_val"
// But it does not show up in pairs:
URL with("http://localhost:8080/?action=select&op=pairs") fetch
// ==> [["dir",{}]]
// rm'ing the key removes both the key-value pair, AND the directory.
URL with("http://localhost:8080/?action=rm&key=dir") fetch
// ==> null
URL with("http://localhost:8080/?action=read&key=dir") fetch
// ==> null
URL with("http://localhost:8080/?action=select&op=pairs") fetch
// ==> []
@richcollins
Copy link
Contributor

This was done to simplify implementation. The convention is to use _name for files and name for directories. The select operation (and others?) use this convention to determine their output. In the future, this info will be stored in the metadata for the nodes.

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

No branches or pull requests

2 participants