path: String- file path to be opened.flags: String- open flags.mode: Number, Default:0666- permission mode.callback: Function(err, fd)err: Error-Errorobject if there was something wrong, otherwisenull.fd: Number- file descriptor.
path: String- file path to be opened.flags: String- open flags.mode: Number, Default:0666- permission mode.
fd: Int- file descriptor.buffer: Buffer- buffer that the data will be written to.offset: Number- offset of the buffer where to start writing.length: Number- number of bytes to read.position: Number- specifying where to start read data from the file, ifnull, read from current position.callback: Function(err, bytesRead, buffer)err: ErrorbytesRead: Numberbuffer: Buffer
fd: Int- file descriptor.buffer: Buffer- buffer that the data will be written to.offset: Number- offset of the buffer where to start writing.length: Number- number of bytes to read.position: Number- specifying where to start read data from the file, ifnull, read from current position.
path: String- file path to be opened.options: Object- options for the operation.encoding: String, Default:null- encoding of the file.flag: String, Default:r- file open flag.callback: Function(err, data)- callback function.err: Errordata: Buffer
Reads entire file asynchronously.
path: String- file path to be opened.options: Object- options for the operation.encoding: String, Default:null- encoding of the file.flag: String, Default:r- file open flag.
Reads entire file synchronously.
fd: Int- file descriptor.buffer: Buffer- buffer that the data will be written from.offset: Number- offset of the buffer where from start reading.length: Number- number of bytes to write.position: Number- specifying where to start write data to the file, ifnull, read from current position.- callback: Function(err, byteWrite)` - callback function.
err: ErrorbyteWrite: Int
fd: Int- file descriptor.buffer: Buffer- buffer that the data will be written from.offset: Number- offset of the buffer where from start reading.length: Number- number of bytes to write.position: Number- specifying where to start write data to the file, ifnull, read from current position.
fd: Int- file descriptor.
Closes the file of fd asynchronously.
fd: Int- file descriptor.
Closes the file of fd synchronously.
path: String- file path to be stated- callback: Function(err, stat)` - callback function.
err: Errorstat: Object
path: String- file path to be stated
fd: Number- file descriptor to be stated- callback: Function(err, stat)` - callback function.
err: Errorstat: Object
fd: Number- file descriptor to be stated
fs.Stats class is a object returned from fs.stats(),fs.fstats() and their synchronous counterparts.
Returns true if stated file is a directory
Returns true if stated file is a file