commit | f8a100aef4089197f863d0f988972d0455bf2dde | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Thu Jan 05 15:09:56 2017 -0800 |
committer | GitHub <noreply@github.com> | Thu Jan 05 15:09:56 2017 -0800 |
tree | ed2955d2d2e8f0d012f81f54c68aaef6ced95785 | |
parent | 72c438ff4c97303f74755d0ab68eb1b6d897fafb [diff] |
Flesh out ChrootFileSystem (#35) This adds tests specific to ChrootFileSystem. These tests exposed some design flaws in the previous implementation of ChrootFileSystem, so this change includes some pretty substantive changes to the implementation in order to bring it up to spec.
A generic file system abstraction for Dart.
This package is currently experimental and subject to change
Like dart:io
, package:file
supplies a rich Dart-idiomatic API for accessing a file system.
Unlike dart:io
, package:file
:
Implement your own custom file system:
import 'package:file/file.dart'; class FooBarFileSystem implements FileSystem { ... }
Use the in-memory file system:
import 'package:file/file.dart'; var fs = new InMemoryFileSystem();
Use the local file system (requires dart:io access):
import 'package:file/io.dart'; var fs = const LocalFileSystem();
The synchronous counterparts can be imported from:
// API and in-memory implementation import `package:file/sync.dart`; // Implementation based on "dart:io" import `package:file/sync_io.dart`;