UpdateMetadata Method

Sets the metadata for a file, folder, or share.

Syntax

int UpdateMetadata(const QString& qsPath, int iResourceType);

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.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Qt Edition - Version 20.0 [Build 8265]