commit | 63adab7508a905d040f68193772fbde49915e03a | [log] [tgz] |
---|---|---|
author | Matan Lurey <matanlurey@users.noreply.github.com> | Mon Nov 14 17:32:01 2016 -0800 |
committer | GitHub <noreply@github.com> | Mon Nov 14 17:32:01 2016 -0800 |
tree | 2b79066d62929638e8c829d1526f1da6044e1932 | |
parent | 2eef867886c7ebc45982fa0e70d4a8d2f5d6341c [diff] | |
parent | d54c076a8dd5aa1ac25a331cc057576a8a1c0c7c [diff] |
Merge pull request #5 from matanlurey/strong_and_dartfmt Fix strong mode issues, enforce dartfmt.
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`;