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

Side by Side Diff: sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 26968003: Remove DirectoryException and LinkException from dart:io and use FileException instaed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge with master. Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 5 /**
6 * To generate docs for a library, run this script with the path to an 6 * To generate docs for a library, run this script with the path to an
7 * entrypoint .dart file, like: 7 * entrypoint .dart file, like:
8 * 8 *
9 * $ dart dartdoc.dart foo.dart 9 * $ dart dartdoc.dart foo.dart
10 * 10 *
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 600
601 void endFile() { 601 void endFile() {
602 final outPath = path.join(outputDir, _filePath); 602 final outPath = path.join(outputDir, _filePath);
603 final dir = new Directory(path.dirname(outPath)); 603 final dir = new Directory(path.dirname(outPath));
604 if (!dir.existsSync()) { 604 if (!dir.existsSync()) {
605 // TODO(3914): Hack to avoid 'file already exists' exception 605 // TODO(3914): Hack to avoid 'file already exists' exception
606 // thrown due to invalid result from dir.existsSync() (probably due to 606 // thrown due to invalid result from dir.existsSync() (probably due to
607 // race conditions). 607 // race conditions).
608 try { 608 try {
609 dir.createSync(); 609 dir.createSync();
610 } on DirectoryException catch (e) { 610 } on FileSystemException catch (e) {
611 // Ignore. 611 // Ignore.
612 } 612 }
613 } 613 }
614 614
615 writeString(new File(outPath), _file.toString()); 615 writeString(new File(outPath), _file.toString());
616 _filePath = null; 616 _filePath = null;
617 _file = null; 617 _file = null;
618 } 618 }
619 619
620 void write(String s) { 620 void write(String s) {
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 return ''' 2312 return '''
2313 <div class="mdn"> 2313 <div class="mdn">
2314 $mdnComment 2314 $mdnComment
2315 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> 2315 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div>
2316 </div> 2316 </div>
2317 '''; 2317 ''';
2318 } 2318 }
2319 2319
2320 String toString() => mdnComment; 2320 String toString() => mdnComment;
2321 } 2321 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/source_file_provider.dart ('k') | sdk/lib/_internal/dartdoc/lib/src/export_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698