commit | a4c6c7f4d7090ce8e8bf99045af545d015899a36 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Fri Dec 09 08:15:36 2016 -0800 |
committer | GitHub <noreply@github.com> | Fri Dec 09 08:15:36 2016 -0800 |
tree | b0c0febdc9170726c338b71d332104a0efc40db6 | |
parent | d9a0e72fd5a7824bcdae5ee1257bfe9ff5e3fef8 [diff] |
Remove separate sync APIs (#9)
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`;