aboutsummaryrefslogtreecommitdiff
path: root/butl/path
diff options
context:
space:
mode:
Diffstat (limited to 'butl/path')
-rw-r--r--butl/path23
1 files changed, 17 insertions, 6 deletions
diff --git a/butl/path b/butl/path
index 4a80b9b..8148b00 100644
--- a/butl/path
+++ b/butl/path
@@ -239,10 +239,14 @@ namespace butl
realize (string_type&);
#endif
- private:
+ // Utilities.
+ //
#ifdef _WIN32
static C
tolower (C);
+
+ static C
+ toupper (C);
#endif
};
@@ -716,13 +720,20 @@ namespace butl
reverse_iterator rend () const {return reverse_iterator (begin ());}
public:
- // Normalize the path. This includes collapsing the '.' and '..'
- // directories if possible, collapsing multiple directory separators, and
- // converting all directory separators to the canonical form. Return
- // *this.
+ // Normalize the path and return*this. Normalization involves collapsing
+ // the '.' and '..' directories if possible, collapsing multiple
+ // directory separators, and converting all directory separators to the
+ // canonical form.
+ //
+ // If actual is true, then for case-insensitive filesystems obtain the
+ // actual spelling of the path. Only an absolute path can be actualized.
+ // If a path component does not exist, then its (and all subsequent)
+ // spelling is unchanged. This is a potentially expensive operation.
+ // Normally one can assume that "well-known" directories (current, home,
+ // etc.) are returned in their actual spelling.
//
basic_path&
- normalize ();
+ normalize (bool actual = false);
// Make the path absolute using the current directory unless it is already
// absolute. Return *this.