commit | d54c076a8dd5aa1ac25a331cc057576a8a1c0c7c | [log] [tgz] |
---|---|---|
author | Matan Lurey <matanl@matanl-macbookpro2.roam.corp.google.com> | Sat Nov 12 14:34:42 2016 -0800 |
committer | Matan Lurey <matanl@matanl-macbookpro2.roam.corp.google.com> | Sat Nov 12 14:34:42 2016 -0800 |
tree | 2b79066d62929638e8c829d1526f1da6044e1932 | |
parent | 2eef867886c7ebc45982fa0e70d4a8d2f5d6341c [diff] |
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`;