getAbsolutePath method

  1. @override
String getAbsolutePath({
  1. String key = '',
  2. String? dirName,
  3. String? fileName,
})
override

Get a unique absolute normalized path.

Implementation

@override
String getAbsolutePath({String key = '', String? dirName, String? fileName}) {
  String fullName = key;
  if (dirName != null) {
    assert(dirName.startsWith(root));
    fullName = path.join(dirName, key);
  } else if (!key.startsWith(root)) {
    fullName = path.join(root, key);
  }
  if (fileName != null) {
    fullName = path.join(fullName, fileName);
  }
  final normalized = Uri.file(fullName).path;
  return normalized;
}