Comments (4)
Definitely a good suggestion. I briefly looked into deferred objects but didn't want to depend on an external library to get the ball rolling. I'll check this out for the future.
from filer.js.
If you use jQuery, I have a small jQuery plugin that wraps filer.js and provides both a promise interface and sequential chaining. https://github.com/macton/jquery.fs.js
So you can do stuff like this:
fs.mkdir( folder_name )
.mkdir( folder_name + '/1' )
.mkdir( folder_name + '/2' )
.mkdir( folder_name + '/3' )
.mkdir( folder_name + '/4' )
.mkdir( folder_name + '/5' )
.ls( folder_name )
.done( function( entries ) {
ok(entries.slice, 'returned entries is an array') // Verify we got an Array.
equal(entries.length, 5, 'Num root entries matches');
start();
})
.fail( onError );
from filer.js.
There are plenty of existing flow control libraries:
- async
- q
- https://github.com/joyent/node/wiki/Modules#wiki-async-flow
- https://npmjs.org/browse/keyword/async
from filer.js.
This is a good FR, but I'm no longer actively maintaining the lib with new features. The FS API is not going to be implemented in other browsers.
from filer.js.
Related Issues (20)
- Compatible common js HOT 1
- Getting qunit into the repo
- "FileError is deprecated" HOT 3
- Illegal Constructor (Blob) when working with Jelly Bean Android (Cordova) HOT 3
- Uncaught error when trying to filer.open() a directory HOT 2
- Filer.find HOT 1
- how can i continual read realtime mp3 buffer to the temporary MP3 file?Can anyone help?Thanks!! HOT 2
- mkDir issues
- Rename Util class HOT 3
- License HOT 1
- Where on my disk can I find file I have created? HOT 3
- File moving should not be done on a patch version HOT 1
- Getting an error while creating simple persistent file HOT 2
- directories not working HOT 4
- synchronous functions HOT 6
- compatibility with Cordova File Plugin HOT 1
- error seeking persistent file permission
- Need a better way to import filer.js for Vue.js HOT 1
- self.requestFileSystem returns SecurityError when running as a Chrome App. HOT 2
- Preview DXF (Catia) files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filer.js.