brfs
brfs copied to clipboard
readdirSync not showing the correct results after file changes
The first time I do fs.readdirSync
it gives me the correct result. After I delete one file and use chokidar
to trigger this unlink
event fs.readdirSync
still gives me the same results. Is this the correct behavior? If yes, is there anyway I can get the updated list of files? Thanks.
Could you provide an example JS program that also prints messages before and after each file operation, in order to easily check order of execution?
If the issue only applies in a program that has been transformed by brfs, please also provide the tramsformed source. Since this issue is posted in brfs, have you verified that it's actually fs.readdirSync
that "still gives […] the same results"? Hasn't it been transformed to a constant representing the file system state at transform time?