diff options
author | David Robillard <d@drobilla.net> | 2020-08-05 23:35:24 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-06 17:34:42 +0200 |
commit | 36af38408e9e5ba2c49738ad08ff2b959bcf7e27 (patch) | |
tree | 973a4c8c1b1603ad9be6e7a075bd5265026d46c1 /src/filesystem.h | |
parent | d40f2ca3498592c2ffcb6de82642dfcb5a6f301d (diff) | |
download | lilv-36af38408e9e5ba2c49738ad08ff2b959bcf7e27.tar.gz lilv-36af38408e9e5ba2c49738ad08ff2b959bcf7e27.tar.bz2 lilv-36af38408e9e5ba2c49738ad08ff2b959bcf7e27.zip |
Add lilv_create_temporary_directory()
Diffstat (limited to 'src/filesystem.h')
-rw-r--r-- | src/filesystem.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/filesystem.h b/src/filesystem.h index 09b8b5f..f5ac35c 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -129,6 +129,17 @@ lilv_dir_for_each(const char* path, void (*f)(const char* path, const char* name, void* data)); /** + Create a unique temporary directory. + + The last six characters of `pattern` must be `XXXXXX` and will be replaced + with random characters. This works roughly like mkdtemp, except the pattern + should only be a directory name, not a full path. The returned path will be + in a suitable system temporary directory. +*/ +char* +lilv_create_temporary_directory(const char* pattern); + +/** Create the directory `dir_path` and any parent directories if necessary. @return Zero on success, or an `errno` error code. |