Adding JS end of things.

This commit is contained in:
Tj 2015-08-18 14:27:52 -04:00
parent bdf657f86e
commit 115de57bc5

View File

@ -9,6 +9,7 @@ var _stat = Promise.promisify(RNFSManager.stat);
var _readFile = Promise.promisify(RNFSManager.readFile);
var _writeFile = Promise.promisify(RNFSManager.writeFile);
var _unlink = Promise.promisify(RNFSManager.unlink);
var _pathForBundle = Promise.promisify(RNFSManager.pathForBundle);
var convertError = (err) => {
if (err.isOperational) {
@ -61,6 +62,10 @@ var RNFS = {
return _writeFile(filepath, base64.encode(contents), options)
.catch(convertError);
},
pathForBundle(bundleName) {
return _pathForBundle(bundleName);
}
unlink(filepath) {
return _unlink(filepath)