filer.js icon indicating copy to clipboard operation
filer.js copied to clipboard

Why ls() changes current working dir (cwd)?

Open ksmolyanin opened this issue 12 years ago • 1 comments

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)

ksmolyanin avatar Mar 01 '13 19:03 ksmolyanin

Can't remember why I did this, but I'll look into it. https://github.com/ebidel/filer.js/pull/20 is related.

ebidel avatar Mar 13 '13 04:03 ebidel