Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::temp_file Class Reference

#include <filesystem.hpp>

Inheritance diagram for fc::temp_file:
Collaboration diagram for fc::temp_file:

Public Member Functions

 temp_file (temp_file &&other)
 
temp_fileoperator= (temp_file &&other)
 
 temp_file (const fc::path &tempFolder=fc::temp_directory_path(), bool create=false)
 
- Public Member Functions inherited from fc::temp_file_base
 ~temp_file_base ()
 
 operator bool () const
 
bool operator! () const
 
const fc::pathpath () const
 
void remove ()
 
void release ()
 

Additional Inherited Members

- Protected Types inherited from fc::temp_file_base
typedef std::optional< fc::pathpath_t
 
- Protected Member Functions inherited from fc::temp_file_base
 temp_file_base (const path_t &path)
 
 temp_file_base (path_t &&path)
 
- Protected Attributes inherited from fc::temp_file_base
path_t _path
 

Detailed Description

Class which creates a temporary directory inside an existing temporary directory.

Definition at line 212 of file filesystem.hpp.

Constructor & Destructor Documentation

◆ temp_file() [1/2]

fc::temp_file::temp_file ( temp_file && other)

Definition at line 401 of file filesystem.cpp.

402 : temp_file_base(std::move(other._path))
403 {
404 }
temp_file_base(const path_t &path)

◆ temp_file() [2/2]

fc::temp_file::temp_file ( const fc::path & tempFolder = fc::temp_directory_path(),
bool create = false )

Definition at line 387 of file filesystem.cpp.

389 {
390 if (fc::exists(*_path))
391 {
392 FC_THROW( "Name collision: ${path}", ("path", _path->string()) );
393 }
394 if (create)
395 {
396 std::ofstream ofs(_path->generic_string().c_str(), std::ofstream::out | std::ofstream::binary);
397 ofs.close();
398 }
399 }
const mie::Vuint & p
Definition bn.cpp:27
#define FC_THROW( ...)
bool exists(const path &p)
path unique_path()
Here is the call graph for this function:

Member Function Documentation

◆ operator=()

temp_file & fc::temp_file::operator= ( temp_file && other)

Definition at line 406 of file filesystem.cpp.

407 {
408 if (this != &other)
409 {
410 remove();
411 _path = std::move(other._path);
412 }
413 return *this;
414 }
Here is the call graph for this function:

The documentation for this class was generated from the following files: