c9 / vfs-local

A VFS implementation for the local file-system.
MIT License
32 stars 39 forks source link

Is there a way to access the folder meta recursively? #15

Closed dolftax closed 8 years ago

dolftax commented 8 years ago

Consider, var options = { recursive : true}. Then vfs.readdir('/', options) should return array of objects with if an object is a folder, it should have a child object which has the meta of the files/folders inside it.

nightwing commented 8 years ago

There is no way to do this, since even on moderate sized folders computing this will be too slow, and the resulting object will be too large. How do you want to use this? in some cases data from filelist can help.

dolftax commented 8 years ago

On click of a folder, fetching from the array of objects could end up as a bad UX. No?

nightwing commented 8 years ago

On click of a folder, fetching from the array of objects could end up as a bad UX. No?

I am not sure what you mean. Currently in cloud9, when opening a folder, loading animation is displayed until the list of files is fetched, and it seems to work ok.

dolftax commented 8 years ago

That makes sense. I just ended up doing the same.

Initially, I was thinking, loading on demand (even file/folder listing) would make the user to wait for a moment and thought of loading the folder meta recursively with a service worker. :-\