InterviewSolution
| 1. |
How will you read a file using Node? |
|
Answer» Following is the syntax of one of the methods to read from a file: fs.read(fd, buffer, offset, length, position, callback) This method will use file descriptor to read the file, if you want to read file using file name directly then you should use another method available. ParametersHere is the description of the parameters used −
|
|