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

Side by Side Diff: base/file_path.h

Issue 17062: Keep trying to undo 7564. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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 | base/file_path.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // FilePath is a container for pathnames stored in a platform's native string 5 // FilePath is a container for pathnames stored in a platform's native string
6 // type, providing containers for manipulation in according with the 6 // type, providing containers for manipulation in according with the
7 // platform's conventions for pathnames. It supports the following path 7 // platform's conventions for pathnames. It supports the following path
8 // types: 8 // types:
9 // 9 //
10 // POSIX Windows 10 // POSIX Windows
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // named by this object, stripping away the file component. If this object 139 // named by this object, stripping away the file component. If this object
140 // only contains one component, returns a FilePath identifying 140 // only contains one component, returns a FilePath identifying
141 // kCurrentDirectory. If this object already refers to the root directory, 141 // kCurrentDirectory. If this object already refers to the root directory,
142 // returns a FilePath identifying the root directory. 142 // returns a FilePath identifying the root directory.
143 FilePath DirName() const; 143 FilePath DirName() const;
144 144
145 // Returns a FilePath corresponding to the last path component of this 145 // Returns a FilePath corresponding to the last path component of this
146 // object, either a file or a directory. If this object already refers to 146 // object, either a file or a directory. If this object already refers to
147 // the root directory, returns a FilePath identifying the root directory; 147 // the root directory, returns a FilePath identifying the root directory;
148 // this is the only situation in which BaseName will return an absolute path. 148 // this is the only situation in which BaseName will return an absolute path.
149 StringType BaseName() const; 149 FilePath BaseName() const;
150 150
151 // Returns a FilePath by appending a separator and the supplied path 151 // Returns a FilePath by appending a separator and the supplied path
152 // component to this object's path. Append takes care to avoid adding 152 // component to this object's path. Append takes care to avoid adding
153 // excessive separators if this object's path already ends with a separator. 153 // excessive separators if this object's path already ends with a separator.
154 // If this object's path is kCurrentDirectory, a new FilePath corresponding 154 // If this object's path is kCurrentDirectory, a new FilePath corresponding
155 // only to |component| is returned. |component| must be a relative path; 155 // only to |component| is returned. |component| must be a relative path;
156 // it is an error to pass an absolute path. 156 // it is an error to pass an absolute path.
157 FilePath Append(const StringType& component) const WARN_UNUSED_RESULT; 157 FilePath Append(const StringType& component) const WARN_UNUSED_RESULT;
158 FilePath Append(const FilePath& component) const WARN_UNUSED_RESULT; 158 FilePath Append(const FilePath& component) const WARN_UNUSED_RESULT;
159 159
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 struct hash<FilePath> { 212 struct hash<FilePath> {
213 size_t operator()(const FilePath& f) const { 213 size_t operator()(const FilePath& f) const {
214 return std::tr1::hash<FilePath::StringType>()(f.value()); 214 return std::tr1::hash<FilePath::StringType>()(f.value());
215 } 215 }
216 }; 216 };
217 217
218 } // namespace __gnu_cxx 218 } // namespace __gnu_cxx
219 #endif // defined(COMPILER_GCC) 219 #endif // defined(COMPILER_GCC)
220 220
221 #endif // BASE_FILE_PATH_H_ 221 #endif // BASE_FILE_PATH_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698