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

Unified Diff: runtime/bin/file_android.cc

Issue 15832003: Change File.directory to not do any IO (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_android.cc
diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
index b166aad74c3387b6f84d854642650746fec5a37a..ba7ac88b8df46632fbb18570ee95a9cfc6b26a3d 100644
--- a/runtime/bin/file_android.cc
+++ b/runtime/bin/file_android.cc
@@ -281,25 +281,6 @@ char* File::GetCanonicalPath(const char* pathname) {
}
-char* File::GetContainingDirectory(char* pathname) {
- // Report errors for non-regular files.
- struct stat st;
- if (TEMP_FAILURE_RETRY(stat(pathname, &st)) == 0) {
- if (!S_ISREG(st.st_mode)) {
- errno = (S_ISDIR(st.st_mode)) ? EISDIR : ENOENT;
- return NULL;
- }
- } else {
- return NULL;
- }
- 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.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698