evanshortiss / html5-fs

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

Use DOMError name instead of deprecated FileError code #5

Closed vitalets closed 7 years ago

vitalets commented 7 years ago

from console:

'FileError is deprecated and will be removed in M54, around October 2016. Please use the 'name' or 'message' attributes of the error rather than 'code'. See https://www.chromestatus.com/features/6687420359639040 for more details.

@evanshortiss

vitalets commented 7 years ago

ping @evanshortiss upd: moved to own implementation of filesystem in browser https://github.com/vitalets/bro-fs

evanshortiss commented 7 years ago

@vitalets will publish shortly, thanks!

evanshortiss commented 7 years ago

@vitalets just noticed your fork comment. You can accomplish your module (Promise wrapper) by doing this if happy to use Bluebird promises or pify module. Not sure if you tried these 😄

var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('html5-fs'))\

fs.readFile('./blah.txt')
  .then((text) => print(text));

// etc.

Let me know if you would like to be maintainer on this repo since I can be slow to respond sometimes.

vitalets commented 7 years ago

hi @evanshortiss!

yes bluebird's promisifyAll is a solution. I used it for some time, but then decided to write own module on pure promises. Anyway thanks for pointing a direction!