summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/filesystem.c6
-rw-r--r--src/filesystem.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/filesystem.c b/src/filesystem.c
index 39ba2a2..4ba0bd9 100644
--- a/src/filesystem.c
+++ b/src/filesystem.c
@@ -115,6 +115,12 @@ lilv_path_is_child(const char* path, const char* dir)
}
char*
+lilv_path_current(void)
+{
+ return getcwd(NULL, 0);
+}
+
+char*
lilv_path_absolute(const char* path)
{
if (lilv_path_is_absolute(path)) {
diff --git a/src/filesystem.h b/src/filesystem.h
index 8971372..b43e394 100644
--- a/src/filesystem.h
+++ b/src/filesystem.h
@@ -29,6 +29,10 @@ lilv_path_is_absolute(const char* path);
bool
lilv_path_is_child(const char* path, const char* dir);
+/// Return the current working directory
+char*
+lilv_path_current(void);
+
/**
Return `path` as an absolute path.