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

Unified Diff: runtime/bin/file_linux.cc

Issue 9416096: Implement File.directory() and File.directorySync() to get (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bogus assert Created 8 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 | « runtime/bin/file_impl.dart ('k') | runtime/bin/file_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_linux.cc
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index e28c322982f320141657a44cd30a954c1f74fc0b..825bdea47fabc5f68c68e0db6cfec9dbefcec901 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -177,6 +177,15 @@ char* File::GetCanonicalPath(const char* pathname) {
}
+char* File::GetContainingDirectory(char* pathname) {
+ char* path = NULL;
+ do {
+ path = dirname(pathname);
+ } while (path == NULL && errno == EINTR);
+ return GetCanonicalPath(path);
+}
+
+
const char* File::PathSeparator() {
return "/";
}
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | runtime/bin/file_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698