Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: pkg/analyzer/lib/file_system/file_system.dart

Issue 1808213004: Add File.renameSync() to virtual file system. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/file_system/file_system.dart
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index 093f47f04f84f62a8b96bc340ba75cadea3e0d71..ba2bf4b55be3d6345a4b083c2f8ef28cb74d5d9c 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -44,6 +44,16 @@ abstract class File implements Resource {
String readAsStringSync();
/**
+ * Synchronously rename this file.
+ * Return a [File] instance for the renamed file.
+ *
+ * If [newPath] identifies an existing file, that file is replaced.
+ * If [newPath] identifies an existing resource the operation might fail and
+ * an exception is thrown.
+ */
+ File renameSync(String newPath);
+
+ /**
* Synchronously write a list of bytes to the file.
*
* Throws a [FileSystemException] if the operation fails.

Powered by Google App Engine
This is Rietveld 408576698