Skip to main content

Commands: UpdateMetadataAsync

Syntax

#Commands: UpdateMetadataAsync

UpdateMetadataAsync is used if you need to change just the file's metadata without any modification to its content.

Task UpdateMetadataAsync(string filename, RavenJObject metadata, Etag etag = null);
Parameters
filenamestringThe modified file name
metadataRavenJObjectNew file metadata
etagEtagThe current file Etag, used for concurrency checks (null skips check)

Return Value
TaskA task that represents the asynchronous metadata update operation.

Example

await store
.AsyncFilesCommands
.UpdateMetadataAsync(
"/movies/intro.avi",
new RavenJObject()
{
{
"AllowRead", "None"
}
});