Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node read file sync

// macOS, Linux, and Windows
fs.readFileSync('<directory>');
// => [Error: EISDIR: illegal operation on a directory, read <directory>]

//  FreeBSD
fs.readFileSync('<directory>'); // => <data>
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #node #read #file #sync
ADD COMMENT
Topic
Name
6+1 =