directoryPath static method
Returns the directory path of the script.
Implementation
static String directoryPath() {
Uri scriptUri = Platform.script;
String scriptPath = scriptUri.toFilePath();
String directoryPath = scriptPath.substring(0, scriptPath.lastIndexOf('/') + 1);
return directoryPath;
}