commit | 57a4a6ce32e368222e98edd0d7be657c8c290ab6 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Sat Jan 28 08:55:17 2017 -0800 |
committer | GitHub <noreply@github.com> | Sat Jan 28 08:55:17 2017 -0800 |
tree | 49223816ea66e7e50a909f849bf76df0cbaee0e7 | |
parent | e4e5372dc2c6e1af4c3bd6091556f47f240d857b [diff] |
Add `FileSystem.path`. (#14) Remove `FileSystem.pathSeparator`, since it can now be expressed as `fileSystem.path.separator`. Fixes #9
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();