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

Side by Side Diff: lib/src/file_system/console.dart

Issue 11465028: rename web_components -> web_ui (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 8 years 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
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 library console; 5 library console;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:utf'; 8 import 'dart:utf';
9 import 'package:web_components/src/file_system.dart'; 9 import 'package:web_ui/src/file_system.dart';
10 import 'path.dart' as internal; 10 import 'path.dart' as internal;
11 11
12 /** File system implementation for console VM (i.e. no browser). */ 12 /** File system implementation for console VM (i.e. no browser). */
13 class ConsoleFileSystem implements FileSystem { 13 class ConsoleFileSystem implements FileSystem {
14 14
15 /** Pending futures for file write requests. */ 15 /** Pending futures for file write requests. */
16 List<Future> _pending = <Future>[]; 16 List<Future> _pending = <Future>[];
17 17
18 Future flush() { 18 Future flush() {
19 return Futures.wait(_pending).transform((_) { 19 return Futures.wait(_pending).transform((_) {
(...skipping 27 matching lines...) Expand all
47 .chain((_) => file.close()) 47 .chain((_) => file.close())
48 .transform((_) => buffer); 48 .transform((_) => buffer);
49 })); 49 }));
50 } 50 }
51 51
52 // TODO(jmesserly): do we support any encoding other than UTF-8 for Dart? 52 // TODO(jmesserly): do we support any encoding other than UTF-8 for Dart?
53 Future<String> readText(internal.Path path) { 53 Future<String> readText(internal.Path path) {
54 return readTextOrBytes(path).transform(decodeUtf8); 54 return readTextOrBytes(path).transform(decodeUtf8);
55 } 55 }
56 } 56 }
OLDNEW
« no previous file with comments | « lib/src/file_system/browser.dart ('k') | lib/src/utils.dart » ('j') | pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698