Read a file on disk as a string.
Assumes file contents are encoded using utf8. This machine should **NEVER** be used in request handling code!
var Filesystem = require('machinepack-fs');
// Read a file on disk as a string.
Filesystem.readSync({
source: '/Users/mikermcneil/.tmp/foo',
}).execSync();
Absolute path to the source file (if relative path is provided, will resolve path from current working directory).
'/Users/mikermcneil/.tmp/foo'
An unexpected error occurred.
No file could be found at the provided `source` path.
The specified path pointed to a directory.
OK.
'stuff in a file!'