How will you get information about a file using Node?
Following is the syntax of the method to get the information about a file:
Here is the description of the parameters used:
path - This is string having file name including path.
callback - This is the callback function which gets two arguments (err, stats) where stats is an object of fs.Stats type which is printed below in the example.