commit | 21dfcff87185435547288a340c1e03d27641e14c | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Mon Apr 09 09:48:37 2018 -0700 |
committer | GitHub <noreply@github.com> | Mon Apr 09 09:48:37 2018 -0700 |
tree | 7380d127152382330032393714cb6913b2f86060 | |
parent | 2b00b23392e6e927950cd2496c25216f076e6694 [diff] |
General cleanup of package:file (#81) * Fix/update analysis options * Fix some linter errors * Run dartfmt * Fix some Dart 2 strong-mode type checks * Remove usage of "part" and "part of" in the forwarding, memory, and local backends. * Fix AppVeyor and Travis scripts to work only for Dart 2 * Comment out test that's causing problems with newer SDKs
A generic file system abstraction for Dart.
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/memory.dart'; var fs = new MemoryFileSystem();
Use the local file system (requires dart:io access):
import 'package:file/local.dart'; var fs = const LocalFileSystem();