commit | 68226d0579681c0deee84688aab7aa1d0b82a422 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Fri Dec 23 15:14:28 2016 -0500 |
committer | GitHub <noreply@github.com> | Fri Dec 23 15:14:28 2016 -0500 |
tree | a5e116c9c36d8d4d907670d48a80deef4766f37f | |
parent | 437ded629edb945e8ccbaf35cd7e5fea10f98af1 [diff] |
Add tests for `File` (#26) This adds comprehensive tests for File. Any tests that didn't pass are commented out in this change; they'll be enabled in follow-on changes that also fix the corresponding bugs.
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`;