brfs icon indicating copy to clipboard operation
brfs copied to clipboard

readdirSync not showing the correct results after file changes

Open ssmlee04 opened this issue 8 years ago • 1 comments

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.

ssmlee04 avatar Sep 02 '15 03:09 ssmlee04

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?

mk-pmb avatar Jul 19 '16 17:07 mk-pmb