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

Side by Side Diff: frog/file_system_node.dart

Issue 9034014: Add support for the node net module. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: new version of minfrog Created 8 years, 11 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 | frog/lib/node/child_process.dart » ('j') | frog/lib/node/net.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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('file_system_node'); 5 #library('file_system_node');
6 6
7 #import('file_system.dart'); 7 #import('file_system.dart');
8 #import('lib/node/node.dart'); 8 #import('lib/node/node.dart');
9 #import('lib/node/fs.dart');
10 #import('lib/node/path.dart');
9 11
10 /** File system implementation using nodejs api's (for self-hosted compiler). */ 12 /** File system implementation using nodejs api's (for self-hosted compiler). */
11 class NodeFileSystem implements FileSystem { 13 class NodeFileSystem implements FileSystem {
12 void writeString(String outfile, String text) { 14 void writeString(String outfile, String text) {
13 fs.writeFileSync(outfile, text); 15 fs.writeFileSync(outfile, text);
14 } 16 }
15 17
16 String readAll(String filename) { 18 String readAll(String filename) {
17 return fs.readFileSync(filename, 'utf8'); 19 return fs.readFileSync(filename, 'utf8');
18 } 20 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } else if (stat.isFile()) { 76 } else if (stat.isFile()) {
75 // Try to remove the file. 77 // Try to remove the file.
76 fs.unlinkSync(subpath); 78 fs.unlinkSync(subpath);
77 } 79 }
78 } 80 }
79 } 81 }
80 82
81 fs.rmdirSync(path); 83 fs.rmdirSync(path);
82 } 84 }
83 } 85 }
OLDNEW
« no previous file with comments | « no previous file | frog/lib/node/child_process.dart » ('j') | frog/lib/node/net.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698