1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Got RN working again

This commit is contained in:
Laurent Cozic
2017-07-05 22:29:00 +01:00
parent f0a8cbe95d
commit 8adb5a71c5
14 changed files with 80 additions and 144 deletions

View File

@ -32,17 +32,19 @@ class Resource extends BaseItem {
return filename(path);
}
// RNFIX: Temporary disabled for React Native
static content(resource) {
// TODO: node-only, and should probably be done with streams
const fs = require('fs-extra');
return fs.readFile(this.fullPath(resource));
// // TODO: node-only, and should probably be done with streams
// const fs = require('fs-extra');
// return fs.readFile(this.fullPath(resource));
}
static setContent(resource, content) {
// TODO: node-only, and should probably be done with streams
const fs = require('fs-extra');
let buffer = new Buffer(content);
return fs.writeFile(this.fullPath(resource), buffer);
// // TODO: node-only, and should probably be done with streams
// const fs = require('fs-extra');
// let buffer = new Buffer(content);
// return fs.writeFile(this.fullPath(resource), buffer);
}
}