CreateShare Method

Creates a new share.

Syntax

int CreateShare();

Remarks

This method creates a new share using the name specified by the Share property.

If the CreateShareQuota configuration setting is a positive, non-zero integer when this method is called, the share will be created with a space quota of that many GB. A share's space quota may be changed at any time using the SetShareQuota method.

If the SendMetadata configuration setting is enabled when this method is called, all items in the Metadata* properties will be sent along with the creation request.

Share Name Rules

Share names must adhere to the following rules:

  • Must be 3 to 63 characters long.
  • Must start with a letter or number; and may only contain letters, numbers, and hyphens.
  • All letters much be lowercase. (For convenience, the class will automatically lowercase all letters in any value assigned to Share.)
  • All hyphens must be immediately preceded and followed by a letter or number (consecutive hyphens are not allowed).

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]