factory file
- Description:
Specifies the file system specific functions.
- These functions are accessible via the
aidesys::
prefix.
- These functions are accessible via the
Methods
(static) readDir(path, patternopt) → {Array.<string>}
- Description:
Lists all files of a directory.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
path |
string | The directory to list. |
||
pattern |
string |
<optional> |
".*"
|
The file pattern regular expression using the ECMAScript syntax. |
Returns:
A std::vector<std::string>
structure with the file names.
- The file base names with file extension and without the directory path are provided.
- Type
- Array.<string>
(static) getFileTime()
- Description:
Gets the file last modificaton time, in milliseconds.
- Returns NAN, if the file does not exists:
std::isnan(aidesys::getFileTime(file))
is equivalent tosys:exists(file)
.
- Returns NAN, if the file does not exists:
(static) exists(file) → {bool}
- Description:
Checks if a file exists. * ```
Parameters:
Name | Type | Description |
---|---|---|
file |
string | The file path name. |
Returns:
True if the file exists and is readable, false otherwise.
- Type
- bool
(static) load(file) → {string}
- Description:
Loads a textual file.
Parameters:
Name | Type | Description |
---|---|---|
file |
string | The file path name. |
Returns:
The file contents as a string.
- Type
- string
(static) save(file, string)
- Description:
Loads a textual file.
Parameters:
Name | Type | Description |
---|---|---|
file |
string | The file path name. |
string |
string | The file contents as a string. |
(static) gnuplot(file, plot, dataopt)
- Description:
Generated a gnuplot interface display script.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
file |
string | The related data file name (without extension). By contract,
To display the gnuplot, run |
||
plot |
string | The gnuplot display commands.
|
||
data |
string |
<optional> |
""
|
An optional string with the plot data. |