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

Side by Side Diff: sdk/lib/io/file.dart

Issue 23054008: Remove the Path class from dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed first round of review comments Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * FileMode describes the modes in which a file can be opened. 8 * FileMode describes the modes in which a file can be opened.
9 */ 9 */
10 class FileMode { 10 class FileMode {
(...skipping 23 matching lines...) Expand all
34 * this.[openWrite](). 34 * this.[openWrite]().
35 * * Open the file for random access operations using [open]. 35 * * Open the file for random access operations using [open].
36 */ 36 */
37 abstract class File implements FileSystemEntity { 37 abstract class File implements FileSystemEntity {
38 /** 38 /**
39 * Create a File object. 39 * Create a File object.
40 */ 40 */
41 factory File(String path) => new _File(path); 41 factory File(String path) => new _File(path);
42 42
43 /** 43 /**
44 * Create a File object from a Path object.
45 */
46 @deprecated
47 factory File.fromPath(Path path) => new _File.fromPath(path);
48
49 /**
50 * Create the file. Returns a [:Future<File>:] that completes with 44 * Create the file. Returns a [:Future<File>:] that completes with
51 * the file when it has been created. 45 * the file when it has been created.
52 * 46 *
53 * Existing files are left untouched by [create]. Calling [create] on an 47 * Existing files are left untouched by [create]. Calling [create] on an
54 * existing file might fail if there are restrictive permissions on 48 * existing file might fail if there are restrictive permissions on
55 * the file. 49 * the file.
56 */ 50 */
57 Future<File> create(); 51 Future<File> create();
58 52
59 /** 53 /**
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 } 540 }
547 } else if (osError != null) { 541 } else if (osError != null) {
548 sb.write(": osError"); 542 sb.write(": osError");
549 if (path != null) { 543 if (path != null) {
550 sb.write(", path = $path"); 544 sb.write(", path = $path");
551 } 545 }
552 } 546 }
553 return sb.toString(); 547 return sb.toString();
554 } 548 }
555 } 549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698