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

Unified Diff: base/file_path.h

Issue 267051: Minimize dependency of user scripts.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « no previous file | base/file_path.cc » ('j') | base/file_path.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.h
===================================================================
--- base/file_path.h (revision 29458)
+++ base/file_path.h (working copy)
@@ -178,6 +178,17 @@
// and BaseName().value() on each child component.
void GetComponents(std::vector<FilePath::StringType>* components) const;
+ // Returns true, and sets *path to resulting full path, if relative_path can
+ // be applied to current path by resolving any '..' it may contain. Returns
+ // false otherwise, e.g., if relative path is absolute, or if it climbs back
+ // up the hierarchy too far (i.e., beyond the root of current path).
+ // Note that if the current path ends with a file name, we won't try to
brettw 2009/10/20 06:06:19 Can you put a blank line separating these two para
MAD 2009/10/20 13:43:29 Done.
+ // figure it out (so this method doesn't go to the disk) and we will blindly
+ // append relative_path at the end of the current path, including the file
+ // name in the current path (if any).
+ bool AppendAndResolveRelative(const FilePath& relative_path,
+ FilePath* path) const;
+
// Returns true if this FilePath is a strict parent of the |child|. Absolute
// and relative paths are accepted i.e. is /foo parent to /foo/bar and
// is foo parent to foo/bar. Does not convert paths to absolute, follow
« no previous file with comments | « no previous file | base/file_path.cc » ('j') | base/file_path.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698