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

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: Don't add an extra / to a directory ending in // 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/directory.dart
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index 6aa18f84c7aa22fe318e0fc4a225dc4124f695dc..80391d4e12257ce65fc691e8bea3e50c3b180560 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -68,59 +68,45 @@ abstract class Directory implements FileSystemEntity {
void createSync({bool recursive: false});
/**
- * Creates a temporary directory in this directory. Additional random
- * characters are appended to [template] to produce a unique directory
- * name.
+ * 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 [prefix] to produce a unique directory
+ * name. If [prefix] is missing or null, the empty string is used
+ * for [prefix].
*
* Returns a [:Future<Directory>:] that completes with the newly
* created temporary directory.
*
* 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]);
/**
* Synchronously creates a temporary directory in this directory.
- * Additional random characters are appended to [template] to produce
- * a unique directory name.
+ * Additional random characters are appended to [prefix] to produce
+ * a unique directory name. If [prefix] is missing or null, the empty
+ * string is used for [prefix].
*
* Returns the newly created temporary directory.
*
* 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
+ * 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();
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698