// lists all files and directories in folder, returns full path
async function listDirRecursive(pathToDir, onlyFiles, onlyDir){
let result = await fs.readdir(pathToDir,{withFileTypes:true, recursive:true})
if(onlyFiles)
result = result.filter(e=>e.isFile())
else if(onlyDir)
result = result.filter(e=>e.isDirectory())
return result.map(e=>path.join(e.path,e.name))
}
await listDirRecursive(pathToDir, true)
And everything works fine with native nodejs version.
I will close this issue, because my issue is already solved with native nodejs version, but just thought of letting you know.
Environment
Actual behavior
cannot read files in ramdisk
Expected behavior
should read files in ramdisk …
I am not 100% sure whether it's due to ramdisk or what.
Ramdisk was created using
and is accessible in /Volumes/myramdisk.
I replaced the code
to
native node js version
And everything works fine with native nodejs version.
I will close this issue, because my issue is already solved with native nodejs version, but just thought of letting you know.
Thanks