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

Unified Diff: sdk/lib/io/directory.dart

Issue 25720002: Add Directory.systemTemp getter to replace createSystemTemp(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dart2js patch files. Created 7 years, 2 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: sdk/lib/io/directory.dart
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index 6aa18f84c7aa22fe318e0fc4a225dc4124f695dc..3e8e351936b2e820f24cc67e1e239ee720f24c21 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -68,6 +68,16 @@ abstract class Directory implements FileSystemEntity {
void createSync({bool recursive: false});
/**
+ * Gets the system temp directory.
+ *
+ * Gets the directory provided by the operating system for creating
+ * temporary files and directories in.
+ * The location of the system temp directory is platform-dependent,
+ * and may be set by an environment variable.
+ */
+ static Directory get systemTemp => _Directory.systemTemp;
+
+ /**
* Creates a temporary directory in this directory. Additional random
* characters are appended to [template] to produce a unique directory
Søren Gjesse 2013/10/02 16:57:37 Didn't you decide to call template for prefix?
Bill Hesse 2013/10/03 12:15:19 Fixed, and behavior of missing argument documented
* name.
@@ -77,8 +87,8 @@ abstract class Directory implements FileSystemEntity {
*
* Deprecated behavior, to be removed Oct 18, 2013: If the path is the
* empty string, the directory is created in the default system temp
- * directory. This capability has been moved to the static function
- * [createSystemTemp].
+ * directory. This capability has been moved to the static getter
+ * [systemTemp].
*/
Future<Directory> createTemp([String template]);
@@ -94,33 +104,7 @@ abstract class Directory implements FileSystemEntity {
* directory. This capability has been moved to the static function
* [createSystemTemp].
*/
- Directory createTempSync([String template]);
-
- /**
- * Creates a temporary directory in the system temp directory.
- * The location of the system temp directory is platform-dependent,
- * and may be set by an environment variable.
- * Additional random characters are appended to [template] to produce
- * a unique directory name.
- *
- * Returns a [:Future<Directory>:] that completes with the newly
- * created temporary directory.
- */
- static Future<Directory> createSystemTemp([String template]) =>
- _Directory.createSystemTemp(template);
-
- /**
- * Synchronously creates a temporary directory in the system temp directory.
- * The location of the system temp directory is platform-dependent,
- * and may be set by an environment variable.
- * Additional random characters are appended to [template] to produce
- * a unique directory name.
- *
- * Returns a [:Future<Directory>:] that completes with the newly
- * created temporary directory.
- */
- static Directory createSystemTempSync([String template]) =>
- _Directory.createSystemTempSync(template);
+ Directory createTempSync([String template]);
Future<String> resolveSymbolicLinks();

Powered by Google App Engine
This is Rietveld 408576698