commit | 1520d7c5a784c3e05340e056314e2ea94c90f289 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Tue Dec 13 09:48:44 2016 -0800 |
committer | GitHub <noreply@github.com> | Tue Dec 13 09:48:44 2016 -0800 |
tree | 65ee67a2aa20414f58d16698329ad530e4ab6e9e | |
parent | ec6b4301111635fe7a6bea6264bec7e44215ebcd [diff] |
Add first round of tests, and associated bug fixes (#15)
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`;