commit | 3fb948885b7292449ba8001ce1b0169bee767ad9 | [log] [tgz] |
---|---|---|
author | Chris Bracken <chris@bracken.jp> | Wed Dec 14 16:59:01 2016 -0800 |
committer | GitHub <noreply@github.com> | Wed Dec 14 16:59:01 2016 -0800 |
tree | b333b121c57c6836a33cbd480ac214524dc16406 | |
parent | 4531665baf4bd25fea0bf13f1cd9c208e9ae65ae [diff] |
Eliminate the need for dart_style dev_dependency (#20) Apply dartfmt straight from the SDK.
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`;