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

Side by Side Diff: include/core/SkOSFile.h

Issue 16098011: Fix bug in setting directories for tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Respond to comments Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/OSPathTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | tests/OSPathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698