fs 1.0.0 fs: ^1.0.0 copied to clipboard
A dart:io's FileSystem available for web.
Vise File System #
This file system is for Dart & Flutter users, who wants cross-platform API
Features #
- cross-platform, working on web!
- open to anyone
- you may need to fork the repo and customize it
- unlike Vise Maps themselves, this code is licensed under 3 clauses, which give you much more freedom
- you may need to fork the repo and customize it
- uses the same API as
dart:io
Getting started #
First install:
$ dart pub add fs
or
$ flutter pub add fs
And then a little bit complicated import:
import 'package:fs/io.dart' if (dart.library.html) 'package:fs/html.dart';
I do not recommend the opposite way:
// BAD
import 'package:fs/html.dart' if (dart.library.io) 'package:fs/io.dart';
for two reason:
- It won't import documentation in your IDE, because the
html.dart
is not documented, since it mirrorsdart:io
- It will import types incompatible with the original ones. An example: