@absolunet/ioc2.1.0

View on GitHub

NullDriver

Null driver to be used when testing or if fake load/write process is needed. Always load null value and successfully write given files.

Extends

Methods

load(file)

Source:
Overrides:
Load the given file.
Parameters:
Name Type Description
file string The file path.
Returns:
The file content.
Type
*

loadAsync(file)

Source:
Overrides:
Asynchronously load the given file.
Parameters:
Name Type Description
file string The file path.
Returns:
The file content.
Type
Promise.<*>

write(file, content, optionsopt)

Source:
Overrides:
Write file in the given destination.
Parameters:
Name Type Attributes Description
file string The file path.
content string | Stream The content to put in the file.
options * <optional>
The options to send to the write process.
Returns:
Indicates that the process was successful.
Type
boolean

writeAsync(file, content, optionsopt)

Source:
Overrides:
Asynchronously write file in the given directory.
Parameters:
Name Type Attributes Description
file string The file path.
content string | Stream The content to put in the file.
options * <optional>
The options to send to the write process.
Returns:
Indicates that the process was successful.
Type
Promise.<boolean>