online source control
back to content
sign up free version control plan

SAWHSDK::getOldVersionFileByVersion

Description

Retrieves an old version of a file from server by version.

Syntax

int getOldVersionFileByVersion(
        String strFileFullNameToGet,
        long lVersionNumber,
        String strLocalFileFullName,
        boolean bMakeWritable,
        int enumModifiedFileHandling,
        int enumEOL,
        int enumCompareFileBy,
        int enumSetLocalFileTime,
        SDiffMergeParameters stDiffMergeParameters,
        BaseDataObject bdobCanceled,
        BaseDataObject bdostrError
);

Parameters

strFileFullNameToGet
[in] Specifies the full name of the file to be retrieved.

iVersionNumber
[in] Specifies the version number of the file version to be retrieved .

strLocalFileFullName
[in] Specifies full name of the local file to which the server file will be retrieved.

bMakeWritable
[in] Specifies whether to make the file writable.

enumModifiedFileHandling
[in] Specifies how to handle the local file if a writable copy of the file exists in the local disk.

enumEOL
[in] Specifies which end-of-line terminator is to be used.

enumCompareFileBy
[in] Specifies how to determine if the local copy of the file is up-to-date, by checksum or date/time.

enumSetLocalFileTime
[in] Specifies the type of time to be assigned to the local file.

stDiffMergeParameters
[in] Specifies the parameters of the diff or merge.

bdobCanceled
[out] If the method fails, returns whether the operation is canceled.

bdostrError
[out] Returns the description of the result. If the operation succeeds, returns 'Completed'. If the operation fails, returns the error information.

Return Value

If the method succeeds, returns 0. If the method fails, returns other error codes.

See Also

Note: If local copies of the files exist and the parameter "enumModifiedFileHandling" is set to the enum "enumAskModifiedFile", the method  "PromptLeaveOrReplaceWritableFile()" will be triggered.