Skip to content

Commit c70c123

Browse files
authored
Add basic example (flutter#128)
1 parent 850ea6d commit c70c123

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

packages/file/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#### 5.0.10
2+
3+
* Added example
4+
15
#### 5.0.9
26

37
* Fix lints for project health

packages/file/example/main.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'package:file/file.dart';
6+
import 'package:file/memory.dart';
7+
8+
Future<void> main() async {
9+
final FileSystem fs = MemoryFileSystem();
10+
final Directory tmp = await fs.systemTempDirectory.createTemp('example_');
11+
final File outputFile = tmp.childFile('output');
12+
await outputFile.writeAsString('Hello world!');
13+
print(outputFile.readAsStringSync());
14+
}

packages/file/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: file
2-
version: 5.0.9
2+
version: 5.0.10
33
authors:
44
- Matan Lurey <matanl@google.com>
55
- Yegor Jbanov <yjbanov@google.com>

0 commit comments

Comments
 (0)