6#ifndef PXR_USD_AR_FILESYSTEM_WRITABLE_ASSET_H
7#define PXR_USD_AR_FILESYSTEM_WRITABLE_ASSET_H
12#include "pxr/usd/ar/api.h"
18PXR_NAMESPACE_OPEN_SCOPE
37 static std::shared_ptr<ArFilesystemWritableAsset>
Create(
60 const void* buffer,
size_t count,
size_t offset)
override;
66PXR_NAMESPACE_CLOSE_SCOPE
ArWritableAsset implementation for asset represented by a file on a filesystem.
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.
AR_API ArFilesystemWritableAsset(TfSafeOutputFile &&file)
Constructs an ArFilesystemWritableAsset for the given file.
virtual AR_API bool Close() override
Closes the file owned by this 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.
Represents a resolved asset path.
WriteMode
Enumeration of write modes for OpenAssetForWrite.
Interface for writing data to an asset.
Opens a file for output, either for update "r+" or to completely replace "w+".
Safe file writer with FILE * interface.