diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-09-04 09:01:19 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-09-04 09:01:19 +0000 |
commit | 414dd87040ca2646206711c0f0d0895a3219ddf1 (patch) | |
tree | 73c6d274881ba97aa6a0e3845b943aaa00446c6c /libs/pbd/pbd/filesystem.h | |
parent | 8b160ef5000f7160bfcb993e2c478c64d784c085 (diff) |
Add path::leaf method function to the PBD::sys::path class
git-svn-id: svn://localhost/ardour2/trunk@2406 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/filesystem.h')
-rw-r--r-- | libs/pbd/pbd/filesystem.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index 5e94138bd8..6798a59c84 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -87,6 +87,12 @@ public: const string to_string() const { return m_path; } /** + * @return the last component of the path, if the path refers to + * a file then it will be the entire filename including any extension. + */ + string leaf() const; + + /** * @returns the directory component of a path without any trailing * path separator or an empty string if the path has no directory * component(branch path). |