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 |