@cordova-plugin-agconnect/clouddb
Version:
Cordova AGC CloudDB Plugin
33 lines (24 loc) • 597 B
JavaScript
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
*/
;
var fs = require("fs");
var FSUtils = (function () {
var api = {};
api.exists = function (path) {
try {
return fs.existsSync(path);
} catch (err) {
/*NOPE*/
}
return false;
};
api.readFile = function (path, encoding) {
return fs.readFileSync(path, encoding);
};
api.writeFile = function (path, content) {
fs.writeFileSync(path, content);
};
return api;
})();
module.exports = FSUtils;