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

Unified Diff: pkg/docgen/lib/src/io.dart

Issue 196133023: pkg/docgen: more cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cl commetns 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/docgen/lib/docgen.dart ('k') | pkg/docgen/test/generate_json_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/io.dart
diff --git a/pkg/docgen/lib/src/io.dart b/pkg/docgen/lib/src/io.dart
index f02272a077ee707318e67c93ccb3ba9321880d8c..96dad80a7fc483e899f930ada252f31d50dca51a 100644
--- a/pkg/docgen/lib/src/io.dart
+++ b/pkg/docgen/lib/src/io.dart
@@ -13,13 +13,14 @@ import 'dart:collection';
import 'dart:io';
import 'package:path/path.dart' as path;
-/// Lists the contents of [dir]. If [recursive] is `true`, lists subdirectory
-/// contents (defaults to `false`). If [includeHidden] is `true`, includes files
-/// and directories beginning with `.` (defaults to `false`).
+/// Lists the contents of [dir].
+///
+/// If [recursive] is `true`, lists subdirectory contents (defaults to `false`).
+///
+/// Excludes files and directories beginning with `.`
///
/// The returned paths are guaranteed to begin with [dir].
-List<String> listDir(String dir, {bool recursive: false,
- bool includeHidden: false}) {
+List<String> listDir(String dir, {bool recursive: false}) {
List<String> doList(String dir, Set<String> listedDirectories) {
var contents = <String>[];
@@ -32,7 +33,7 @@ List<String> listDir(String dir, {bool recursive: false,
var children = <String>[];
for (var entity in new Directory(dir).listSync()) {
- if (!includeHidden && path.basename(entity.path).startsWith('.')) {
+ if (path.basename(entity.path).startsWith('.')) {
continue;
}
« no previous file with comments | « pkg/docgen/lib/docgen.dart ('k') | pkg/docgen/test/generate_json_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698