| OLD | NEW |
| 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 /// A simple library for rendering a list of files as a directory tree. | 5 /// A simple library for rendering a list of files as a directory tree. |
| 6 library directory_tree; | 6 library directory_tree; |
| 7 | 7 |
| 8 import '../../pkg/path/lib/path.dart' as path; | 8 import '../../pkg/pathos/lib/path.dart' as path; |
| 9 import 'log.dart' as log; | 9 import 'log.dart' as log; |
| 10 | 10 |
| 11 /// Draws a directory tree for the given list of files. Given a list of files | 11 /// Draws a directory tree for the given list of files. Given a list of files |
| 12 /// like: | 12 /// like: |
| 13 /// | 13 /// |
| 14 /// TODO | 14 /// TODO |
| 15 /// example/console_example.dart | 15 /// example/console_example.dart |
| 16 /// example/main.dart | 16 /// example/main.dart |
| 17 /// example/web copy/web_example.dart | 17 /// example/web copy/web_example.dart |
| 18 /// test/absolute_test.dart | 18 /// test/absolute_test.dart |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 buffer.add(prefix); | 124 buffer.add(prefix); |
| 125 buffer.add(_getPrefix(name == null, isLast)); | 125 buffer.add(_getPrefix(name == null, isLast)); |
| 126 buffer.add('| (${childNames.length - 6} more...)\n'); | 126 buffer.add('| (${childNames.length - 6} more...)\n'); |
| 127 | 127 |
| 128 // Show the last few. | 128 // Show the last few. |
| 129 _drawChild(false, childNames[childNames.length - 3]); | 129 _drawChild(false, childNames[childNames.length - 3]); |
| 130 _drawChild(false, childNames[childNames.length - 2]); | 130 _drawChild(false, childNames[childNames.length - 2]); |
| 131 _drawChild(true, childNames[childNames.length - 1]); | 131 _drawChild(true, childNames[childNames.length - 1]); |
| 132 } | 132 } |
| 133 } | 133 } |
| OLD | NEW |