Closed rajascript closed 6 years ago
The usual recommended way is to check if fs.unlink
returned an ENOENT and ignore it. This avoid the additional (synchronous) file operation and possible race conditions.
yes initially we were doing an existSync
check, but it was later dropped based on @Acconut 's comment
Throws ENOENT without this.