IPWorks Cloud 2020 C++ Edition

Questions / Feedback?

ClearRange Method

Clears a range of bytes from a file.

Syntax

ANSI (Cross Platform)
int ClearRange(const char* lpszFilePath, int64 lFirst, int64 lLast);

Unicode (Windows)
INT ClearRange(LPCWSTR lpszFilePath, LONG64 lFirst, LONG64 lLast);
- (void)clearRange:(NSString*)filePath :(long long)first :(long long)last;
#define MID_AZUREFILE_CLEARRANGE 5

IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_AzureFile_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method clears the range of bytes from First to Last (inclusive) from the file at FilePath in the share currently selected by Share.

The server tracks ranges of file data in 512-byte chunks, aligned to the absolute beginning of the file. When this method is called, the server frees any such chunks that are completely covered by the specified range of bytes ([First]-[Last]), and writes 0s to the appropriate portions of any chunks which are not completely covered by that range.

Freed chunks are not included in the results returned by GetRanges.

Error Handling (C++)

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 C++ Edition - Version 20.0 [Build 8265]