The fs
module provides four different ways to read data from files: in one large chunk, in chunks using synchronous writes, in chunks using asynchronous writes, or streaming through a Readable
stream. All these methods are effective. Which one you use depends on the particular needs of your application. The following sections describe how to use and implement these methods.