getAbsolutePath method
Get a unique absolute normalized path.
Implementation
String getAbsolutePath({String key = '', String? dirName, String? fileName}) {
// if (key.startsWith(HTResourceContext.hetuLocalPackagePrefix)) {
// return '$root$defaultLocalPackagesFolder/${key.substring(4)}/$hetuModuleEntryFileName';
// } else {
var name = key;
if (!path.isAbsolute(name)) {
if (dirName != null) {
name = path.join(dirName, name);
}
if (!path.isAbsolute(name)) {
name = path.join(path.current, name);
}
}
if (fileName != null) {
name = path.join(name, fileName);
}
final encoded = Uri.file(name).path;
final normalized = Uri.decodeFull(encoded);
return normalized;
// }
}