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

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

Issue 14907002: dart:io | Implement asynchronous versions of FileSystemEntity methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add implementation of FileSystemEntity.type, and refactor error handling. Created 7 years, 7 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 | « sdk/lib/io/common.dart ('k') | sdk/lib/io/file_impl.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class _Directory implements Directory { 7 class _Directory implements Directory {
8 static const CREATE_REQUEST = 0; 8 static const CREATE_REQUEST = 0;
9 static const DELETE_REQUEST = 1; 9 static const DELETE_REQUEST = 1;
10 static const EXISTS_REQUEST = 2; 10 static const EXISTS_REQUEST = 2;
11 static const CREATE_TEMP_REQUEST = 3; 11 static const CREATE_TEMP_REQUEST = 3;
12 static const LIST_REQUEST = 4; 12 static const LIST_REQUEST = 4;
13 static const RENAME_REQUEST = 5; 13 static const RENAME_REQUEST = 5;
14 14
15 static const SUCCESS_RESPONSE = 0;
16 static const ILLEGAL_ARGUMENT_RESPONSE = 1;
17 static const OSERROR_RESPONSE = 2;
18
19 _Directory(String this._path); 15 _Directory(String this._path);
20 _Directory.fromPath(Path path) : this(path.toNativePath()); 16 _Directory.fromPath(Path path) : this(path.toNativePath());
21 17
22 external static String _current(); 18 external static String _current();
23 external static _setCurrent(path); 19 external static _setCurrent(path);
24 external static _createTemp(String template); 20 external static _createTemp(String template);
25 external static int _exists(String path); 21 external static int _exists(String path);
26 external static _create(String path); 22 external static _create(String path);
27 external static _delete(String path, bool recursive); 23 external static _delete(String path, bool recursive);
28 external static _rename(String path, String newPath); 24 external static _rename(String path, String newPath);
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 331
336 void _ensureDirectoryService() { 332 void _ensureDirectoryService() {
337 if (_directoryService == null) { 333 if (_directoryService == null) {
338 _directoryService = _newServicePort(); 334 _directoryService = _newServicePort();
339 } 335 }
340 } 336 }
341 337
342 final String _path; 338 final String _path;
343 SendPort _directoryService; 339 SendPort _directoryService;
344 } 340 }
OLDNEW
« no previous file with comments | « sdk/lib/io/common.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698