commit | e0a9b967f16861702074b65f21a34222e20c4f18 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Thu Jan 05 14:53:56 2017 -0800 |
committer | GitHub <noreply@github.com> | Thu Jan 05 14:53:56 2017 -0800 |
tree | b7dbe290cb3aff3a7ee18ca4df1a0d23119866c3 | |
parent | 2d5f65e6b764ed82c7b31b90cd80c1ca2c200e24 [diff] |
Fixes to MemoryFileSystem (#33) In the process of writing more tests and working on ChrootFileSystem, I discovered a few places in MemoryFileSystem that needed fixing.
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`;