ebidel / filer.js

A wrapper library for the HTML5 Filesystem API what reuses UNIX commands (cp, mv, ls) for its API.
Other
1.49k stars 155 forks source link

directories not working #63

Open wehowski opened 7 years ago

wehowski commented 7 years ago

I can read and write a file in the root. But if I use directories in any way nothing is working. I tried absolute and relative pathes, with filesystem: or / as root, but everytime it throws ___ does not exist. Even if .cd(dir) before relative path.

Maybe it is possible to use the directory-/file- objects rather than the path as string, but that means to traverse any directory from start!?

Maybe someone has a hint?

wehowski commented 7 years ago

The fullPath property of my DirectoryEntries resolves to /filesystem:http:/persitent/path I believe it should be /filesystem:http://persitent/path or just /path

?

ebidel commented 7 years ago

Can you post a jsbin that repros the issue?

On Sat, Nov 5, 2016, 9:37 PM Till Wehowski notifications@github.com wrote:

The fullPath property of my DirectoryEntries resolves to /filesystem:http:/persitent/path I believe it should be /filesystem:http://persitent/path or just /path

?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ebidel/filer.js/issues/63#issuecomment-258660079, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOigNxa5_2jwmL70yBL-pl994PNt0s0ks5q7VmXgaJpZM4KqLs7 .

wehowski commented 7 years ago

I accidentally prepended the scheme/protocol manually to the path in one place. My Testexample is working now, except if I prepend '/' to the path. In my App some files/pathes still not working, but I think I can overwork it to take care of cwd! It seems that I must chdir all the time to reset the path after opening directories. In my wrapper I now clone the current filer instance when performing a method call to try to avoid concurrent instances changing the path, but I am not sure if this really works.

Unfortunatly my test is not running in jsbin https://jsbin.com/mugicodayu/edit?html,js,output but I have a test here http://webfan.de/cdn/application/test/fs.filer.html and the code here https://github.com/frdl/-Flow/blob/master/api-d/4/js-api/library.js/core/plugin.core.js#L11070

wehowski commented 7 years ago

Update: My example above is running in Opera, not FF not IE right now.