@absolunet/ioc2.1.0

View on GitHub

TextDriver

Plain text driver that does not parse or write in any particular way.

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:
Inherited From:
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:
Inherited From:
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>