ISAWHAppObject::AddFolder
Description
Adds an entire local folder to the server.
Syntax
long AddFolder(
BSTR ParentProjectName,
BSTR LocalFolder,
VARIANT_BOOL Recursive,
BSTR Comment,
VARIANT_BOOL UseReadOnly,
Enum_FileType FileType,
Enum_CompareFileBy
CompareFileBy,
Enum_SetLocalFileTime
SetLocalFileTime,
VARIANT_BOOL RemoveLocalCopy,
VARIANT_BOOL* Cancelled,
BSTR* ResultDescription,
ISAWHOperationResultSet* OperationResultSet
);
Parameters
ParentProjectName
[in] Specifies the full name of project to which the folder
will be added.
LocalFolder
[in] Specifies full name of the local folder to be added.
Recursive
[in] Specifies whether the folder will be added recursively.
Comment
[in] Specifies the comments for the Add operation.
UseReadOnly
[in] Specifies whether to use read-only flag on the unchecked-out local file copies after the Add
operation.
FileType
[in] Specifies the types of files in the folder to be added.
CompareFileBy
[in] Specifies how to determine if the local copy is up-to-date, by checksum or by date/time.
SetLocalFileTime
[in] Specifies how to set the date/time of the local file.
RemoveLocalCopy
[in] Specifies whether to delete the local file copies after the Add operation.
Cancelled
[out] If the method fails, returns whether the operation is cancelled.
ResultDescription
[out] Returns the description of the return value. If the method succeeds, returns
'Completed'. If the method fails, returns the description of the error.
OperationResultSet
[out] Returns the result information set of the operation.
Return Value
If the method succeeds, returns 0. If the method fails, returns other error codes.
See Also
Sample
VB Sample:
Dim WithEvents sdkObject As SAWHSDKLib.SAWHAppObject Set sdkObject = New SAWHSDKLib.SAWHAppObject Private Sub AddFolder_Click() Dim Cancelled As Boolean Dim ResultDescription As String Dim ParentProjectName As String Dim LocalFolder As String Dim Comment As String Dim OperationResultSet As New SAWHOperationResultSet ParentProjectName = "$/AddFolder" LocalFolder = "D:\LocalFolder" Comment = "Add folder" ResultValue = sdkObject.AddFolder(ParentProjectName, LocalFolder, False, Comment, True, Enum_Autodetect, Enum_CompareFileByChecksum, Enum_SetLocalFileTimeCurrent, False, Cancelled, ResultDescription, OperationResultSet) If ResultValue <> 0 Then MsgBox ("Failed to add the local folder.") End If End Sub |