commit | f53c50f393cc810ea0e120a351418718b478f151 | [log] [tgz] |
---|---|---|
author | Todd Volkert <tvolkert@users.noreply.github.com> | Sat Jan 07 13:21:24 2017 -0800 |
committer | GitHub <noreply@github.com> | Sat Jan 07 13:21:24 2017 -0800 |
tree | a09908a642e340f54b53e8f85c9c6aa380d43f3c | |
parent | 5caa51f9d0de64516f97f48c35d01f08f9f69155 [diff] |
Remove test flakiness (#59) This fixes the tests for Directory.list() to not be dependent on the order of the directory listing, since different operating systems return files in different orders in LocalFileSystem.
A generic file system abstraction for Dart.
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/memory.dart'; var fs = new MemoryFileSystem();
Use the local file system (requires dart:io access):
import 'package:file/local.dart'; var fs = const LocalFileSystem();