| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 // TODO: add unittests for all these operations | 10 // TODO: add unittests for all these operations |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 uint16_t* fStr; | 119 uint16_t* fStr; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 /** | 122 /** |
| 123 * Functions for modifying SkStrings which represent paths on the filesystem. | 123 * Functions for modifying SkStrings which represent paths on the filesystem. |
| 124 */ | 124 */ |
| 125 class SkOSPath { | 125 class SkOSPath { |
| 126 public: | 126 public: |
| 127 /** | 127 /** |
| 128 * Assembles rootPath and relativePath into a single path, like this: | 128 * Assembles rootPath and relativePath into a single path, like this: |
| 129 * rootPath/relativePath | 129 * rootPath/relativePath. |
| 130 * It is okay to call with a NULL rootPath and/or relativePath. A path |
| 131 * separator will still be inserted. |
| 130 * | 132 * |
| 131 * Uses SkPATH_SEPARATOR, to work on all platforms. | 133 * Uses SkPATH_SEPARATOR, to work on all platforms. |
| 132 */ | 134 */ |
| 133 static SkString SkPathJoin(const char *rootPath, const char *relativePath); | 135 static SkString SkPathJoin(const char *rootPath, const char *relativePath); |
| 134 | 136 |
| 135 /** | 137 /** |
| 136 * Return the name of the file, ignoring the directory structure. | 138 * Return the name of the file, ignoring the directory structure. |
| 137 * Behaves like python's os.path.basename. If the fullPath is | 139 * Behaves like python's os.path.basename. If the fullPath is |
| 138 * /dir/subdir/, an empty string is returned. | 140 * /dir/subdir/, an empty string is returned. |
| 139 * @param fullPath Full path to the file. | 141 * @param fullPath Full path to the file. |
| 140 * @return SkString The basename of the file - anything beyond the | 142 * @return SkString The basename of the file - anything beyond the |
| 141 * final slash, or the full name if there is no slash. | 143 * final slash, or the full name if there is no slash. |
| 142 */ | 144 */ |
| 143 static SkString SkBasename(const char* fullPath); | 145 static SkString SkBasename(const char* fullPath); |
| 144 }; | 146 }; |
| 145 #endif | 147 #endif |
| OLD | NEW |