mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 18:20:16 -04:00
Add drop_and_recreate in privatefile class.
When creating a private file we need to delete the file if exist.
This commit is contained in:
parent
c8214782fb
commit
267e31f5b7
3 changed files with 26 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue