MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetUniquePath

Function GetUniquePath

src/util/getuniquepath.cpp:9–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <util/strencodings.h>
8
9fs::path GetUniquePath(const fs::path& base)
10{
11 FastRandomContext rnd;
12 fs::path tmpFile = base / HexStr(rnd.randbytes(8));
13 return tmpFile;
14}

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
DirIsWritableFunction · 0.85

Calls 2

randbytesMethod · 0.80
HexStrFunction · 0.70

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68