HideFile Method

Hides a file.

Syntax

QString HideFile(const QString& qsBucketId, const QString& qsFileName);

Remarks

This method hides the file named FileName in the bucket specified by BucketId by creating a special version of the file called a hide marker.

If the latest version of a file is a hide marker, then the file will not appear in the results returned by ListFiles, nor can it be downloaded by name using DownloadFile. However:

  • Any version of the file (excluding hide markers) can still be downloaded directly using DownloadFileById.
  • All versions of the file can still be deleted, either all at once using DeleteFile, or individually using DeleteFileVersion.
  • All versions of the file will still appear in the results returned by ListFileVersions, and can still be queried individually using GetFileInfo.

To unhide a file, simply delete the hide marker using DeleteFileVersion.

The currently-authenticated application key must have the writeFiles capability to call this method successfully, otherwise the server will return an error. Refer to the AccountCapabilities property for more information.

Error Handling

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its 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.

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