commit | ec6b4301111635fe7a6bea6264bec7e44215ebcd | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Tue Dec 13 08:33:16 2016 -0800 |
committer | GitHub <noreply@github.com> | Tue Dec 13 08:33:16 2016 -0800 |
tree | d3cd9608e6359a43433dbb2ebf70b926fe6ce8c9 | |
parent | a6cd20494316d6dc5663f7fc5a24238f85bc3980 [diff] |
Make _FileSink adhere to API spec. (#14)
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`;