Also what does file.fsinfo() say?
But I wouldn't reflash your system. Have you tried doing a file.format()?
the file system of nodemcu is spiffs. It is"just" some c code that implements file handling behavior on top
of raw byte blocks in the flash. It has to manage information about free space, names, blocks of files making up the fs.
If some bug in sdk, nodemcu, spiffs damages that metadata everything can happen.
If it ever happens again the author may be interested in the raw contents of the underlying flash to
check for probable bugs.
Current version of spiffs seems to be 0.3.0.
Cal