Method description:
Test whether a file under a certain path exists.
The callback function contains a parameter exists, true if the file exists, otherwise false.
Grammar:
Since this method belongs to the fs module, the fs module needs to be introduced before use (var fs= require(“fs”) )
Receive parameters:
path file path to be detected
callback callback
Example:
Source code: