UpdateItemInfo Method

Updates an item with new information.

Syntax

int UpdateItemInfo(const QString& qsItemId);

Remarks

This method updates the item information for an item identified by ItemId. The item should be in the Item* properties and should be modified from there.

The following properties can be updated from the ShareFileItem* properties:

  • Description
  • ExpirationTime
  • Name
  • ParentId

Note that the string root may be used as a ParentId to represent the root folder, and the string home may be used as a folder Id to represent the home folder for the current user. Other special id's include:

  • home
  • favorites
  • allshared
  • connectors
  • box
  • top.

ShareFile.Items[0].Description = "New Description";
ShareFile.Items[0].ExpirationDate = "2099-01-01T00:00:00Z";
ShareFile.Items[0].Name = "New_Name.txt";
ShareFile.Items[0].ParentId = ShareFile.Items[1].Id;
ShareFile.UpdateItemInfo(ShareFile.Items[0].Id);

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]