diff options
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index a2e767ff..dd165360 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -674,6 +674,22 @@ SerdNode* SERD_ALLOCATED serd_new_boolean(bool b); /** + Create a new file URI node for a file that exists on this system. + + This is like serd_new_file_uri() except it resolves and canonicalizes the + path, so the returned node is always a complete file URI with a scheme and + absolute path that does not contain any dot references or links, or NULL if + this is impossible (for example, because the path does not exist). + + This should be used wherever the URI for an existent file is required, for + example to set the base URI of a document. +*/ +SERD_API +SerdNode* SERD_ALLOCATED +serd_new_real_file_uri(const char* SERD_NULLABLE path, + const char* SERD_NULLABLE hostname); + +/** Create a new node by serialising `d` into an xsd:decimal string The resulting node will always contain a `.', start with a digit, and end |