Class: FileUtils

FileUtils()

Utilities related to working with files and the file system.

Constructor

new FileUtils()

Author:
  • Mihail Radkov
  • Svilen Velikov
Source:

Methods

(static) getReadStream(filePath) → {ReadableStream}

Opens a readable stream from a file located at the provided file path.

If the file path is blank or points to non existent file, the method will result in an error.

Parameters:
Name Type Description
filePath string

path to the file to be read

Source:
Throws:

if the file path is not provided or no file exists for it

Type
Error
Returns:

stream with the file data

Type
ReadableStream