mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
The fs.* files are already part of the libbitcoin_util library. With the introduction of the fs_helpers.* it makes sense to move fs.* into the util/ directory as well.
14 lines
No EOL
431 B
C++
14 lines
No EOL
431 B
C++
// Copyright (c) 2021-2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <random.h>
|
|
#include <util/fs.h>
|
|
#include <util/strencodings.h>
|
|
|
|
fs::path GetUniquePath(const fs::path& base)
|
|
{
|
|
FastRandomContext rnd;
|
|
fs::path tmpFile = base / fs::u8path(HexStr(rnd.randbytes(8)));
|
|
return tmpFile;
|
|
} |