@absolunet/ioc2.1.0

View on GitHub

YamlDriver

YAML driver that allow .yml/.yaml file interpretation load. Allow to write into .yml/yaml file from a JSON serialisable instance.

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>