Skip to content

Commit d22941d

Browse files
committed
initial
1 parent 69972c1 commit d22941d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/exceptions.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ bool _checkCode(FileSystemException exception, bool Function(int) check) {
1212
return (code != null) && check(code);
1313
}
1414

15+
/// Adds cross-platform extensions that give explanations to common problems when accessing files.
1516
extension FileSystemExceptionExplanation on FileSystemException {
17+
18+
/// Occurs when the requested file or directory does not exist;
19+
/// or its parent directory does not exist.
1620
bool get isNoSuchFileOrDirectory {
1721
return _checkCode(this, isNoSuchFileOrDirectoryCode);
1822
}
1923

24+
/// Occurs when you try to non-recursively delete a directory but it contains files.
2025
bool get isDirectoryNotEmpty {
2126
return _checkCode(this, isNotEmptyCode);
2227
}

0 commit comments

Comments
 (0)