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

Side by Side Diff: utils/lib/file_system_vm.dart

Issue 11358145: Update utils to new library syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « utils/lib/file_system_memory.dart ('k') | utils/peg/pegparser.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 // TODO(terry): Investigate common library for file I/O shared between frog and tools. 5 // TODO(terry): Investigate common library for file I/O shared between frog and tools.
6 6
7 #library('file_system_vm'); 7 library file_system_vm;
8 #import('dart:io'); 8 import 'dart:io';
9 #import('file_system.dart'); 9 import 'file_system.dart';
10 #import('dart:utf'); 10 import 'dart:utf';
11 11
12 /** File system implementation using the vm api's. */ 12 /** File system implementation using the vm api's. */
13 class VMFileSystem implements FileSystem { 13 class VMFileSystem implements FileSystem {
14 void writeString(String path, String text) { 14 void writeString(String path, String text) {
15 var file = new File(path).openSync(FileMode.WRITE); 15 var file = new File(path).openSync(FileMode.WRITE);
16 file.writeStringSync(text); 16 file.writeStringSync(text);
17 file.closeSync(); 17 file.closeSync();
18 } 18 }
19 19
20 String readAll(String filename) { 20 String readAll(String filename) {
(...skipping 12 matching lines...) Expand all
33 void createDirectory(String path, [bool recursive = false]) { 33 void createDirectory(String path, [bool recursive = false]) {
34 // TODO(rnystrom): Implement. 34 // TODO(rnystrom): Implement.
35 throw 'createDirectory() is not implemented by VMFileSystem yet.'; 35 throw 'createDirectory() is not implemented by VMFileSystem yet.';
36 } 36 }
37 37
38 void removeDirectory(String path, [bool recursive = false]) { 38 void removeDirectory(String path, [bool recursive = false]) {
39 // TODO(rnystrom): Implement. 39 // TODO(rnystrom): Implement.
40 throw 'removeDirectory() is not implemented by VMFileSystem yet.'; 40 throw 'removeDirectory() is not implemented by VMFileSystem yet.';
41 } 41 }
42 } 42 }
OLDNEW
« no previous file with comments | « utils/lib/file_system_memory.dart ('k') | utils/peg/pegparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698