getDir function

Directory getDir (String path)

Return the directory pointed to by the given path. This method converts the given path to a platform dependent path.

Implementation

Directory getDir(String path) {
  if (_sep == '/') {
    return new Directory(path);
  } else {
    return new Directory(path.replaceAll('/', _sep));
  }
}