"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileUtils = void 0; const fs = require("fs"); const path = require("node:path"); const fs_1 = require("fs"); class FileUtils { static listFilesInDirectory(directory) { if (fs.lstatSync(directory).isDirectory()) { return fs.readdirSync(directory).map(fileName => path.join(directory, fileName)); } else { return []; } } static prepareFileForWriting(file) { const parentDirectory = path.dirname(file); if (!fs.existsSync(parentDirectory)) { (0, fs_1.mkdirSync)(parentDirectory, { recursive: true }); } } } exports.FileUtils = FileUtils; //# sourceMappingURL=FileUtils.js.map