ChrootFileSystem constructor

ChrootFileSystem(FileSystem delegate, String root)

Creates a new file system backed by root path in delegate file system.

NOTE: root must be a canonicalized path; see p.canonicalize.

Implementation

ChrootFileSystem(this.delegate, this.root) {
  if (root != delegate.path.canonicalize(root)) {
    throw new ArgumentError.value(root, 'root', 'Must be canonical path');
  }
  _cwd = _localRoot;
}