evanshortiss / html5-fs

Node.js style wrapper for the HTML5/Cordova FileSystem API
16 stars 7 forks source link

Fix fs.exists API and a bug when trying to create non-existing file. Update all dependencies. #4

Closed haadcode closed 7 years ago

haadcode commented 8 years ago

There was a bug where fileSystem.getFile would return an error when used via fs.exist(). This was due to not passing the opts to this.getDirectory in fileSystem.js, line 137. This PR will fix that bug.

fs.exists had the callback signature of (err, res) whereas Node.js fs.exists API returns a single argument in the callback ((exists), true|false). This PR will change the fs.exists API to match that of Node.js'.

Also, updated all dependencies to their latest versions and fixed Gruntfile to reflect newer versions.

evanshortiss commented 8 years ago

Wow, thanks @haadcode will take a look in detail ASAP and get it published