filer.js
filer.js copied to clipboard
Why ls() changes current working dir (cwd)?
I think your library is excellent but ... I guess that semantics of ls() (derived from UNIX "ls" command) presupposes its read only behavior. In your implementation it changes current working directory. For example these steps: mkdir('/dir1' .... ls('/dir1/' ... mkdir('/dir2' ... lead to the following dir structure: /dir1/dir2 (dir2 is a sub-folder) while these ones (just without intermediate ls()): mkdir('/dir1' .... mkdir('/dir2' ... to this structure: /dir1 /dir2 (both dirs are in the root)
Can't remember why I did this, but I'll look into it. https://github.com/ebidel/filer.js/pull/20 is related.