commit | 653c2fdc996ba31f35c0e1dbfb0eb53959aab408 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Tue Dec 13 13:32:12 2016 -0800 |
committer | GitHub <noreply@github.com> | Tue Dec 13 13:32:12 2016 -0800 |
tree | d2c7cf5edf0fa227f50f72297b8d342a7c64b0c2 | |
parent | 1520d7c5a784c3e05340e056314e2ea94c90f289 [diff] |
More work towards proper testing (#16) - Add stub tests for Directory. Please review for coverage; impl will come later - Rename tests to follow common pattern - Fix some cases where we weren't matching the behavior of dart:io libraries
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`;