This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/style/node_modules/next/dist/esm/lib/get-files-in-dir.js
2025-01-11 09:54:09 +03:00

18 lines
504 B
JavaScript

import { join } from "path";
import fs from "fs/promises";
export async function getFilesInDir(path) {
const dir = await fs.opendir(path);
const results = [];
for await (const file of dir){
let resolvedFile = file;
if (file.isSymbolicLink()) {
resolvedFile = await fs.stat(join(path, file.name));
}
if (resolvedFile.isFile()) {
results.push(file.name);
}
}
return results;
}
//# sourceMappingURL=get-files-in-dir.js.map