Bitcoin ABC  0.26.3
P2P Digital Currency
getuniquepath.cpp
Go to the documentation of this file.
1 #include <fs.h>
2 #include <random.h>
3 #include <util/strencodings.h>
4 
7  fs::path tmpFile = base / HexStr(rnd.randbytes(8));
8  return tmpFile;
9 }
Fast randomness source.
Definition: random.h:156
std::vector< uint8_t > randbytes(size_t len)
Generate random bytes.
Definition: random.cpp:690
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Definition: fs.h:30
fs::path GetUniquePath(const fs::path &base)
Helper function for getting a unique path.
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.