commit | 67e015a039ef2217eebb7e4fea69d42f8763496b | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Fri Dec 16 12:12:35 2016 -0800 |
committer | GitHub <noreply@github.com> | Fri Dec 16 12:12:35 2016 -0800 |
tree | 02ab93f0f918f9c3cefd16a0bb0ec2eeeb86c143 | |
parent | f855b82b46bdec0e8b2c2f6772bf53eb0984ac67 [diff] |
Add ChrootFileSystem. (#22) - Add ChrootFileSystem. - Wire up local_test.dart to use it
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`;