OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 /// File access APIs. Only supported when Fletch is running on a Posix platform. | 5 /// File access APIs. Only supported when Fletch is running on a Posix platform. |
6 /// | 6 /// |
7 /// Usage | 7 /// Usage |
8 /// ----- | 8 /// ----- |
9 /// ```dart | 9 /// ```dart |
10 /// import 'package:file/file.dart'; | 10 /// import 'package:file/file.dart'; |
11 /// | 11 /// |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 static bool existsAsFile(String path) => sys.access(path) == 0; | 185 static bool existsAsFile(String path) => sys.access(path) == 0; |
186 } | 186 } |
187 | 187 |
188 class FileException implements Exception { | 188 class FileException implements Exception { |
189 final String message; | 189 final String message; |
190 | 190 |
191 FileException(this.message); | 191 FileException(this.message); |
192 | 192 |
193 String toString() => "FileException: $message"; | 193 String toString() => "FileException: $message"; |
194 } | 194 } |
OLD | NEW |