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

Unified Diff: include/core/SkOSFile.h

Issue 450743002: Add option to dump images from nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move the clear Created 6 years, 4 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 | « bench/nanobench.cpp ('k') | src/utils/SkOSFile.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkOSFile.h
diff --git a/include/core/SkOSFile.h b/include/core/SkOSFile.h
index 39eeb4b0b09a94ae9984f5a31b9f0559ec984410..69a74dfcaa3331594a1ef68a9824c4eb700945e3 100644
--- a/include/core/SkOSFile.h
+++ b/include/core/SkOSFile.h
@@ -123,7 +123,7 @@ public:
/**
* Functions for modifying SkStrings which represent paths on the filesystem.
*/
-class SkOSPath {
+class SkOSPath {
public:
/**
* Assembles rootPath and relativePath into a single path, like this:
@@ -144,6 +144,17 @@ public:
* final slash, or the full name if there is no slash.
*/
static SkString Basename(const char* fullPath);
+
+ /**
+ * Given a qualified file name returns the directory.
+ * Behaves like python's os.path.dirname. If the fullPath is
+ * /dir/subdir/ the return will be /dir/subdir/
+ * @param fullPath Full path to the file.
+ * @return SkString The dir containing the file - anything preceding the
+ * final slash, or the full name if ending in a slash.
+ */
+ static SkString Dirname(const char* fullPath);
+
};
#endif
« no previous file with comments | « bench/nanobench.cpp ('k') | src/utils/SkOSFile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698