javascript - fs.existsSync returns false on windows for a file, read lock file of which was manually deleted -


during read , write operations, errors encountered , noticed there read lock file.

for example, if working on file "/somefolder/somefile.txt", had read lock file name "/somefolder/somefile.txt_" left alive after runtime error.

i manually deleted it. manually deleted original file , recreated same.

but following returns false , node js refuses recognize file kind of operation.

console.log(fs.existssync(somepath));

on fs.access(somepath) error:

{ error: enoent: no such file or directory, access 'c:\somefile.json'   errno: -4058,   code: 'enoent',   syscall: 'access',   path: 'c:\\somefile.json'  } 

any workaround this?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -