ConceptCreator/app/storage/FileUtils.js

17 lines
510 B
JavaScript
Raw Normal View History

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