Index: sdk/lib/_internal/pub/lib/src/io.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart |
index c55c17b67e345308edbe6b4e2e02fed1787267e2..58a52ef00eaf0e412fb618ec23763f836da0273f 100644 |
--- a/sdk/lib/_internal/pub/lib/src/io.dart |
+++ b/sdk/lib/_internal/pub/lib/src/io.dart |
@@ -392,6 +392,17 @@ void deleteEntry(String path) { |
}); |
} |
+/// Attempts to delete whatever's at [path], but doesn't throw an exception if |
+/// the deletion fails. |
+void tryDeleteEntry(String path) { |
+ try { |
+ deleteEntry(path); |
+ } catch (error, stackTrace) { |
+ log.fine("Failed to delete $entry: $error\n" |
+ "${new Chain.forTrace(stackTrace)}"); |
+ } |
+} |
+ |
/// "Cleans" [dir]. |
/// |
/// If that directory already exists, it is deleted. Then a new empty directory |