HDK
|
#include <filesystemWritableAsset.h>
Public Member Functions | |
AR_API | ArFilesystemWritableAsset (TfSafeOutputFile &&file) |
virtual AR_API | ~ArFilesystemWritableAsset () |
virtual AR_API bool | Close () override |
virtual AR_API size_t | Write (const void *buffer, size_t count, size_t offset) override |
Public Member Functions inherited from ArWritableAsset | |
virtual AR_API | ~ArWritableAsset () |
ArWritableAsset (const ArWritableAsset &)=delete | |
ArWritableAsset & | operator= (const ArWritableAsset &)=delete |
Static Public Member Functions | |
static AR_API std::shared_ptr < ArFilesystemWritableAsset > | Create (const ArResolvedPath &resolvedPath, ArResolver::WriteMode writeMode) |
Additional Inherited Members | |
Protected Member Functions inherited from ArWritableAsset | |
AR_API | ArWritableAsset () |
ArWritableAsset implementation for asset represented by a file on a filesystem.
This implementation uses TfSafeOutputFile; in the case where the asset has been opened for replacement, data will be written to a temporary file which will be renamed over the destination file when this object is destroyed. See documentation for TfSafeOutputFile for more details.
Definition at line 46 of file filesystemWritableAsset.h.
|
explicit |
Constructs an ArFilesystemWritableAsset for the given file
. The ArFilesystemWritableAsset takes ownership of file
.
|
virtual |
|
overridevirtual |
Closes the file owned by this asset. If the TfSafeOutputFile was opened for replacement, the temporary file that was being written to be will be renamed over the destination file.
Implements ArWritableAsset.
|
static |
Constructs a new ArFilesystemWritableAsset for the file at resolvedPath
with the given writeMode
. Returns a null pointer if the file could not be opened.
|
overridevirtual |
Writes count
bytes from buffer
at offset
from the beginning of the file held by this object. Returns number of bytes written, or 0 on error.
Implements ArWritableAsset.