23 #ifndef PXR_USD_AR_FILESYSTEM_WRITABLE_ASSET_H 24 #define PXR_USD_AR_FILESYSTEM_WRITABLE_ASSET_H 29 #include "pxr/usd/ar/api.h" 35 PXR_NAMESPACE_OPEN_SCOPE
54 static std::shared_ptr<ArFilesystemWritableAsset>
Create(
70 virtual bool Close()
override;
77 const void* buffer,
size_t count,
size_t offset)
override;
83 PXR_NAMESPACE_CLOSE_SCOPE
Interface for writing data to an asset.
static AR_API std::shared_ptr< ArFilesystemWritableAsset > Create(const ArResolvedPath &resolvedPath, ArResolver::WriteMode writeMode)
Constructs a new ArFilesystemWritableAsset for the file at resolvedPath with the given writeMode.
virtual AR_API bool Close() override
Closes the file owned by this asset.
ArWritableAsset implementation for asset represented by a file on a filesystem.
Safe file writer with FILE * interface.
Represents a resolved asset path.
AR_API ArFilesystemWritableAsset(TfSafeOutputFile &&file)
Constructs an ArFilesystemWritableAsset for the given file.
Opens a file for output, either for update "r+" or to completely replace "w+".
WriteMode
Enumeration of write modes for OpenAssetForWrite.
virtual AR_API size_t Write(const void *buffer, size_t count, size_t offset) override
Writes count bytes from buffer at offset from the beginning of the file held by this object.