Question:

How will you delete a directory?

Answer:

Following is the syntax of the method to remove a directory:

fs.rmdir(path, callback)

Parameters

Here is the description of the parameters used:

  • path - This is the directory 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