| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 class FileSystemEntityType { | 7 class FileSystemEntityType { |
| 8 static const FILE = const FileSystemEntityType._internal(0); | 8 static const FILE = const FileSystemEntityType._internal(0); |
| 9 static const DIRECTORY = const FileSystemEntityType._internal(1); | 9 static const DIRECTORY = const FileSystemEntityType._internal(1); |
| 10 static const LINK = const FileSystemEntityType._internal(2); | 10 static const LINK = const FileSystemEntityType._internal(2); |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 /** | 364 /** |
| 365 * Synchronously checks if typeSync(path) returns | 365 * Synchronously checks if typeSync(path) returns |
| 366 * FileSystemEntityType.DIRECTORY. | 366 * FileSystemEntityType.DIRECTORY. |
| 367 */ | 367 */ |
| 368 static bool isDirectorySync(String path) => | 368 static bool isDirectorySync(String path) => |
| 369 (_getTypeSync(path, true) == FileSystemEntityType.DIRECTORY._type); | 369 (_getTypeSync(path, true) == FileSystemEntityType.DIRECTORY._type); |
| 370 | 370 |
| 371 | 371 |
| 372 static _throwIfError(Object result, String msg) { | 372 static _throwIfError(Object result, String msg) { |
| 373 if (result is OSError) { | 373 if (result is OSError) { |
| 374 throw new FileIOException(msg, result); | 374 throw new FileException(msg, result); |
| 375 } else if (result is ArgumentError) { | 375 } else if (result is ArgumentError) { |
| 376 throw result; | 376 throw result; |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 } | 379 } |
| OLD | NEW |