OpenVDB  9.0.1
Public Member Functions | List of all members
TempFile Class Reference

Output stream to a unique temporary file. More...

#include <openvdb/io/TempFile.h>

Inherits ostream.

Public Member Functions

 TempFile ()
 Create and open a unique file. More...
 
 ~TempFile ()
 
const std::string & filename () const
 Return the path to the temporary file. More...
 
bool is_open () const
 Return true if the file is open for writing. More...
 
void close ()
 Close the file. More...
 

Detailed Description

Output stream to a unique temporary file.

Constructor & Destructor Documentation

TempFile ( )

Create and open a unique file.

On UNIX systems, the file is created in the directory specified by the environment variable OPENVDB_TEMP_DIR, if that variable is defined, or else in the directory specified by TMPDIR, if that variable is defined. Otherwise (and on non-UNIX systems), the file is created in the system default temporary directory.

~TempFile ( )

Member Function Documentation

void close ( )

Close the file.

const std::string& filename ( ) const

Return the path to the temporary file.

bool is_open ( ) const

Return true if the file is open for writing.