UpdateMetadata Method
Sets the metadata for a file, folder, or share.
Syntax
azurefile.updateMetadata(path, resourceType, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method sets the metadata for a file, folder, or share to the items currently held by the Metadata* properties. The ResourceType parameter indicates the kind of resource the class should prepare the request for; possible values are:
- 0: Set the metadata for the file at the specified Path in the share currently selected by Share.
- 1: Set the metadata for the folder at the specified Path in the share currently selected by Share.
- 2: Set the metadata for the share currently selected by Share (Path is ignored).
Note that it is not possible to do a partial metadata update. That is, all metadata currently associated with the remote entity will be replaced with the metadata sent in the request.