commit | 0cb5e782ba73d910e6062e50380e2ee9df697a22 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Mon Dec 12 13:24:23 2016 -0800 |
committer | GitHub <noreply@github.com> | Mon Dec 12 13:24:23 2016 -0800 |
tree | 3e07af00a5e05ae5a221261879386d379ac170b7 | |
parent | a4c6c7f4d7090ce8e8bf99045af545d015899a36 [diff] |
Partial implementation of in-memory file system. (#10) This implements most of the in-memory file system. The only part that's not complete is memory_file.dart. The rest of the impl, plus tests, will follow for both the in-memory implementation and the local backend in an upcoming change.
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`;