OpenVDB: TempFile Class Reference

OpenVDB 7.1.0

Public Member Functions | List of all members
TempFile Class Reference

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

`#include <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()

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()

~TempFile | ( |  | ) |

## Member Function Documentation

## ◆ close()

void close | ( |  | ) |

Close the file.

## ◆ filename()

const std::string& filename | ( |  | ) | const

Return the path to the temporary file.

## ◆ is_open()

bool is_open | ( |  | ) | const

Return `true` if the file is open for writing.

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

- TempFile.h