joplin/ReactNativeClient/lib/fs-driver-node.js

20 lines
340 B
JavaScript
Raw Normal View History

2017-07-05 22:29:03 +00:00
const fs = require('fs-extra');
2017-07-05 21:52:31 +00:00
class FsDriverNode {
appendFileSync(path, string) {
return fs.appendFileSync(path, string);
}
writeBinaryFile(path, content) {
let buffer = new Buffer(content);
return fs.writeFile(path, buffer);
}
readFile(path) {
return fs.readFile(path);
}
}
2017-07-05 22:29:03 +00:00
module.exports.FsDriverNode = FsDriverNode;