Question:

How will you delete a file using Node?

Answer:

Following is the syntax of the method to delete a file:

fs.unlink(path, callback)

Parameters

Here is the description of the parameters used:

  • path - This is the file name including path.

  • callback - This is the callback function which gets no arguments other than a possible exception are given to the completion callback.


Keywords:

© 2017 QuizBucket.org