mirror of
https://github.com/status-im/react-native-fs.git
synced 2025-03-01 07:20:33 +00:00
Adding JS end of things.
This commit is contained in:
parent
bdf657f86e
commit
115de57bc5
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user