@absolunet/ioc2.1.0

View on GitHub

Driver

Abstract driver that defines the basic interface for a file manager driver.

Members

(static) dependencies :Array.<string>

Source:
Class dependencies: ['file.engine'].

Methods

(abstract) load(file)

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

(abstract) loadAsync(file)

Source:
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:
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:
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>