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

Side by Side Diff: pkg/docgen/lib/src/io.dart

Issue 202193002: pkg/dartdoc: moving files around, fix library names (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « pkg/docgen/lib/src/dart2yaml.dart ('k') | pkg/docgen/lib/src/mdn.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 library io; 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
Alan Knight 2014/03/17 17:31:57 Shouldn't these all be 2014?
kevmoo 2014/03/17 17:45:53 Done.
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.
4
2 /// This is a helper library to make working with io easier. 5 /// This is a helper library to make working with io easier.
6 library docgen.io;
7
3 // TODO(janicejl): listDir, canonicalize, resolveLink, and linkExists are from 8 // TODO(janicejl): listDir, canonicalize, resolveLink, and linkExists are from
4 // pub/lib/src/io.dart. If the io.dart file becomes a package, should remove 9 // pub/lib/src/io.dart. If the io.dart file becomes a package, should remove
5 // copy of the functions. 10 // copy of the functions.
6 11
7 import 'dart:collection'; 12 import 'dart:collection';
8 import 'dart:io'; 13 import 'dart:io';
9 import 'package:path/path.dart' as path; 14 import 'package:path/path.dart' as path;
10 15
11 /// Lists the contents of [dir]. If [recursive] is `true`, lists subdirectory 16 /// Lists the contents of [dir]. If [recursive] is `true`, lists subdirectory
12 /// contents (defaults to `false`). If [includeHidden] is `true`, includes files 17 /// contents (defaults to `false`). If [includeHidden] is `true`, includes files
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 while (linkExists(link) && !seen.contains(link)) { 146 while (linkExists(link) && !seen.contains(link)) {
142 seen.add(link); 147 seen.add(link);
143 link = path.normalize(path.join( 148 link = path.normalize(path.join(
144 path.dirname(link), new Link(link).targetSync())); 149 path.dirname(link), new Link(link).targetSync()));
145 } 150 }
146 return link; 151 return link;
147 } 152 }
148 153
149 /// Returns whether [link] exists on the file system. This will return `true` 154 /// Returns whether [link] exists on the file system. This will return `true`
150 /// for any symlink, regardless of what it points at or whether it's broken. 155 /// for any symlink, regardless of what it points at or whether it's broken.
151 bool linkExists(String link) => new Link(link).existsSync(); 156 bool linkExists(String link) => new Link(link).existsSync();
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/dart2yaml.dart ('k') | pkg/docgen/lib/src/mdn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698