getDir function

Directory getDir(
  1. 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 Directory(path);
  } else {
    return Directory(path.replaceAll('/', _sep));
  }
}