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

Side by Side Diff: utils/lib/file_system.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/css/uitest.dart ('k') | utils/lib/file_system_memory.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 /** Abstraction for file systems and utility functions to manipulate paths. */ 7 /** Abstraction for file systems and utility functions to manipulate paths. */
8 #library('file_system'); 8 library file_system;
9 9
10 /** 10 /**
11 * Abstraction around file system access to work in a variety of different 11 * Abstraction around file system access to work in a variety of different
12 * environments. 12 * environments.
13 */ 13 */
14 abstract class FileSystem { 14 abstract class FileSystem {
15 String readAll(String filename); 15 String readAll(String filename);
16 16
17 void writeString(String outfile, String text); 17 void writeString(String outfile, String text);
18 18
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 String basename(String path) { 66 String basename(String path) {
67 path = canonicalizePath(path); 67 path = canonicalizePath(path);
68 68
69 int lastSlash = path.lastIndexOf('/', path.length); 69 int lastSlash = path.lastIndexOf('/', path.length);
70 if (lastSlash == -1) { 70 if (lastSlash == -1) {
71 return path; 71 return path;
72 } else { 72 } else {
73 return path.substring(lastSlash + 1); 73 return path.substring(lastSlash + 1);
74 } 74 }
75 } 75 }
OLDNEW
« no previous file with comments | « utils/css/uitest.dart ('k') | utils/lib/file_system_memory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698