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

Unified Diff: utils/pub/command_lish.dart

Issue 12255016: Get rid of old redundant methods in io.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise and update to latest. Created 7 years, 10 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 | « no previous file | utils/pub/entrypoint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/command_lish.dart
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index d3a2cb4bf67aca21851b9a193626036be19a6081..f2e5f0529234ea30d9bb58c2d95fecb82d9943ba 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -146,15 +146,15 @@ class LishCommand extends PubCommand {
return listDir(rootDir, recursive: true).then((entries) {
return entries
.where(fileExists) // Skip directories.
- .map((entry) => relativeTo(entry, rootDir));
+ .map((entry) => path.relative(entry, from: rootDir));
});
}).then((files) => files.where(_shouldPublish).toList());
}
/// Returns `true` if [file] should be published.
bool _shouldPublish(String file) {
- if (_BLACKLISTED_FILES.contains(basename(file))) return false;
- return !splitPath(file).any(_BLACKLISTED_DIRS.contains);
+ if (_BLACKLISTED_FILES.contains(path.basename(file))) return false;
+ return !path.split(file).any(_BLACKLISTED_DIRS.contains);
}
/// Returns the value associated with [key] in [map]. Throws a user-friendly
« no previous file with comments | « no previous file | utils/pub/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698