diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-09-04 09:01:15 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-09-04 09:01:15 +0000 |
commit | 4cf84efe8896d7be295993418bbde9e5d3c0cfee (patch) | |
tree | 71037ff1fb67b7424524aed2db0779996558ddf1 /libs/pbd/pbd/filesystem.h | |
parent | 26c4c12fb79e40f908b0357a063bb94d104f9f69 (diff) |
Modify PBD::sys::basename to match boost::filesystem behaviour and document it.
This makes this function equivalent to PBD::basename_nosuffix, sys::basename
takes a path as an argument rather than a string but that is ok as a path can
automatically constructed from a string.
git-svn-id: svn://localhost/ardour2/trunk@2404 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/filesystem.h')
-rw-r--r-- | libs/pbd/pbd/filesystem.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index a5b0ed5b28..b5f328acf4 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -162,7 +162,14 @@ bool remove(const path & p); */ void copy_file(const path & from_path, const path & to_path); - +/** + * @return The substring of the filename component of the path, starting + * at the beginning of the filename up to but not including the last dot. + * + * boost::filesystem::path::basename differs from g_path_get_basename and + * ::basename and most other forms of basename in that it removes the + * extension from the filename if the filename has one. + */ string basename (const path& p); } // namespace sys |