24 #ifndef PXR_BASE_TF_SAFE_OUTPUT_FILE_H
25 #define PXR_BASE_TF_SAFE_OUTPUT_FILE_H
58 , _targetFileName(std::move(other._targetFileName))
59 , _tempFileName(std::move(other._tempFileName))
60 { other._file =
nullptr; }
64 _targetFileName = std::move(other._targetFileName);
65 _tempFileName = std::move(other._tempFileName);
66 other._file =
nullptr;
91 FILE *
Get()
const {
return _file; }
103 FILE *_file =
nullptr;
110 #endif // PXR_BASE_TF_SAFE_OUTPUT_FILE_H
static TF_API TfSafeOutputFile Replace(std::string const &fileName)
GLsizei const GLchar *const * string
TF_API bool IsOpenForUpdate() const
FILE * Get() const
Return the opened FILE *.
TF_API FILE * ReleaseUpdatedFile()
TfSafeOutputFile & operator=(TfSafeOutputFile &&other)
static TF_API TfSafeOutputFile Update(std::string const &fileName)
Open fileName for update ("r+").
TF_API ~TfSafeOutputFile()
Destructor invokes Close().
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
TfSafeOutputFile()=default
TfSafeOutputFile(TfSafeOutputFile &&other)