getFileSystemAndRelativePathByPath method

(IFileSystem?, String?) getFileSystemAndRelativePathByPath(
  1. String path
)

Implementation

(IFileSystem?, String?) getFileSystemAndRelativePathByPath(String path) {
  var target = rootPrefix(path);
  if (target != "") {
    var relativePath = relative(path, from: target);
    if (relativePath == ".") {
      return (_fileSystems[target], r"\");
    } else {
      return (_fileSystems[target], "\\$relativePath");
    }
  }
  return (null, null);
}