aboutsummaryrefslogtreecommitdiff
path: root/src/util/getuniquepath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/getuniquepath.cpp')
-rw-r--r--src/util/getuniquepath.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/getuniquepath.cpp b/src/util/getuniquepath.cpp
new file mode 100644
index 0000000000..9839d2f624
--- /dev/null
+++ b/src/util/getuniquepath.cpp
@@ -0,0 +1,10 @@
+#include <random.h>
+#include <fs.h>
+#include <util/strencodings.h>
+
+fs::path GetUniquePath(const fs::path& base)
+{
+ FastRandomContext rnd;
+ fs::path tmpFile = base / HexStr(rnd.randbytes(8));
+ return tmpFile;
+} \ No newline at end of file