commit | 437ded629edb945e8ccbaf35cd7e5fea10f98af1 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Fri Dec 16 17:07:57 2016 -0800 |
committer | GitHub <noreply@github.com> | Fri Dec 16 17:07:57 2016 -0800 |
tree | 1d91b5c4d7397db5665192a8b0f6f3e9f0920d39 | |
parent | d11edcafb31666346b92ab06c4d3f283409013c7 [diff] |
Minor fixes, and a few new tests (#24)
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`;