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

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

Issue 14223007: Make common file mode and encoding constants available on the top level in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
11 static const READ = const FileMode._internal(0); 11 static const READ = const FileMode._internal(0);
12 static const WRITE = const FileMode._internal(1); 12 static const WRITE = const FileMode._internal(1);
13 static const APPEND = const FileMode._internal(2); 13 static const APPEND = const FileMode._internal(2);
14 const FileMode._internal(int this._mode); 14 const FileMode._internal(int this._mode);
15 final int _mode; 15 final int _mode;
16 } 16 }
17 17
18 const READ = FileMode.READ;
19 const WRITE = FileMode.WRITE;
20 const APPEND = FileMode.APPEND;
18 21
19 /** 22 /**
20 * [File] objects are references to files. 23 * [File] objects are references to files.
21 * 24 *
22 * If [path] is a symbolic link, rather than a file, then 25 * If [path] is a symbolic link, rather than a file, then
23 * the methods of [File] operate on the ultimate target of the 26 * the methods of [File] operate on the ultimate target of the
24 * link, except for File.delete and File.deleteSync, which operate on 27 * link, except for File.delete and File.deleteSync, which operate on
25 * the link. 28 * the link.
26 * 29 *
27 * To operate on the underlying file data there are two options: 30 * To operate on the underlying file data there are two options:
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 sb.write(" ($osError)"); 525 sb.write(" ($osError)");
523 } 526 }
524 } else if (osError != null) { 527 } else if (osError != null) {
525 sb.write(": osError"); 528 sb.write(": osError");
526 } 529 }
527 return sb.toString(); 530 return sb.toString();
528 } 531 }
529 final String message; 532 final String message;
530 final OSError osError; 533 final OSError osError;
531 } 534 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698