diff options
author | David Robillard <d@drobilla.net> | 2020-12-18 16:52:55 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-18 17:38:39 +0100 |
commit | b8c3fa9e5476d5d6bb5413f9d52d406475f9e900 (patch) | |
tree | 497bfa55734f13801fbddc8b966167b110c0a446 /src/filesystem.h | |
parent | dfe0b71df1dde284f1aa9cf7ba3d85e19ce1b5a5 (diff) | |
download | lilv-b8c3fa9e5476d5d6bb5413f9d52d406475f9e900.tar.gz lilv-b8c3fa9e5476d5d6bb5413f9d52d406475f9e900.tar.bz2 lilv-b8c3fa9e5476d5d6bb5413f9d52d406475f9e900.zip |
Add lilv_path_filename()
Diffstat (limited to 'src/filesystem.h')
-rw-r--r-- | src/filesystem.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/filesystem.h b/src/filesystem.h index 14f25d7..319dd49 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -60,6 +60,14 @@ lilv_path_relative_to(const char* path, const char* base); char* lilv_path_parent(const char* path); +/** + Return the filename component of `path` without any directories. + + Returns the empty string if `path` is the root path. +*/ +char* +lilv_path_filename(const char* path); + /// Join path `a` and path `b` with a single directory separator between them char* lilv_path_join(const char* a, const char* b); |