@ts-dev-tools/core
Version:
TS dev tools Core
23 lines (22 loc) • 756 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileService = void 0;
var fs_1 = require("fs");
var FileService = /** @class */ (function () {
function FileService() {
}
FileService.fileExists = function (filePath) {
return (0, fs_1.existsSync)(filePath);
};
FileService.getFileContent = function (filePath) {
return (0, fs_1.readFileSync)(filePath, "utf-8");
};
FileService.putFileContent = function (path, content) {
(0, fs_1.writeFileSync)(path, content);
};
FileService.copyFile = function (sourcePath, destinationPath) {
(0, fs_1.copyFileSync)(sourcePath, destinationPath);
};
return FileService;
}());
exports.FileService = FileService;