diff options
author | David Robillard <d@drobilla.net> | 2020-11-10 09:45:15 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 23:05:22 -0500 |
commit | f7d10ea309fb52d09a58b2832fe4a09a120b16aa (patch) | |
tree | 3b5d870063d0565ac29334ffb64363fdac23b012 /include/serd | |
parent | b9cc3b642a9365c033c1fa31458d7822b42d0913 (diff) | |
download | serd-f7d10ea309fb52d09a58b2832fe4a09a120b16aa.tar.gz serd-f7d10ea309fb52d09a58b2832fe4a09a120b16aa.tar.bz2 serd-f7d10ea309fb52d09a58b2832fe4a09a120b16aa.zip |
Add serd_canonical_path()
Diffstat (limited to 'include/serd')
-rw-r--r-- | include/serd/serd.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 72a4c3fa..362de28d 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -256,6 +256,19 @@ size_t serd_strlen(const char* SERD_NONNULL str, SerdNodeFlags* SERD_NULLABLE flags); /** + Return `path` as a canonical absolute path. + + This expands all symbolic links, relative references, and removes extra + directory separators. Null is returned on error, including if the path does + not exist. + + @return A new string that must be freed with serd_free(), or null. +*/ +SERD_API +char* SERD_NULLABLE +serd_canonical_path(const char* SERD_NONNULL path); + +/** @} @defgroup serd_io_functions I/O Function Types @{ |