@ts-dev-tools/core
Version:
TS dev tools Core
21 lines (20 loc) • 648 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileService = void 0;
const node_fs_1 = require("node:fs");
class FileService {
constructor() { }
static fileExists(filePath) {
return (0, node_fs_1.existsSync)(filePath);
}
static getFileContent(filePath) {
return (0, node_fs_1.readFileSync)(filePath, "utf-8");
}
static putFileContent(path, content) {
(0, node_fs_1.writeFileSync)(path, content);
}
static copyFile(sourcePath, destinationPath) {
(0, node_fs_1.copyFileSync)(sourcePath, destinationPath);
}
}
exports.FileService = FileService;