Whether the given path exists by checking with the file system asynchronously. Module package can check only files which are located in the module package path.
isExist(relativeFilePath: string) {
const rootFilePath = dartfs.getModuleRootDirPath(this);
if (dartfs.exists(path.join(rootFilePath, relativeFilePath))) {
// do someting
}
}
A target file path.
Return
Get disk's free size and total size information.
A directory path to check.
Return
Get root directory path where module has been installed.
A caller's context
Asynchronously reads the entire contents of a file. Module package can read only files which are located in the module package path.
readConfigFile() {
const rootFilePath = dartfs.getModuleRootDirPath(this);
const processTemplate = dartfs.readFile(this.moduleContext, path.join(rootFilePath, "process_template.drl"));
...
}
A caller's context.
A target file path.
Return
Executes a SQL query.
The SQL query string to be executed.
A Promise that resolves with the query result.
Generated using TypeDoc
An interface enables interacting with the file system. There are only some APIs because we do not want that module packages control all files.
1