diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2024-05-20 23:37:41 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2024-05-20 23:37:41 -0500 |
| commit | 19fa7dceac6de9a2c8c5f6231284a26a5bc60ed0 (patch) | |
| tree | cd84d2e098035650ddedf7c96f632326797d77a0 /src/common/util.h | |
| parent | f48fc72fb6ba7def014a68044300fdb86be8603c (diff) | |
| parent | 100a7d06eee6d3f60a1c2d00af53e4665c5f5690 (diff) | |
| download | monzero-core-19fa7dceac6de9a2c8c5f6231284a26a5bc60ed0.tar.gz monzero-core-19fa7dceac6de9a2c8c5f6231284a26a5bc60ed0.tar.xz monzero-core-19fa7dceac6de9a2c8c5f6231284a26a5bc60ed0.zip | |
Merge pull request #9292
100a7d0 Add drop_and_recreate in privatefile class. When creating a private file we need to delete the file if exist. (0xFFFC0000)
Diffstat (limited to 'src/common/util.h')
| -rw-r--r-- | src/common/util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/util.h b/src/common/util.h index f489594e8..35b897017 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -80,7 +80,11 @@ namespace tools /*! \return File only readable by owner and only used by this process OR `private_file{}` on error. */ - static private_file create(std::string filename); + static private_file create(std::string filename, uint32_t extra_flags = 0); + + /*! \return Drop and create file only readable by owner and only used + by this process OR `private_file{}` on error. */ + static private_file drop_and_recreate(std::string filename); private_file(private_file&&) = default; private_file& operator=(private_file&&) = default; |
