TouchFile Method

Touches a range of data in a cached file.

Syntax

public void TouchFile(string fileId, long position, int count, bool flush);
Public Sub TouchFile(ByVal FileId As String, ByVal Position As Long, ByVal Count As Integer, ByVal Flush As Boolean)

Remarks

This method "touches" a range of data in the cached file identified by FileId, thereby marking it as changed and in need of flushing. The range of data to be touched starts at the specified Position and extends for Count bytes.

The cache will automatically attempt to read in any unavailable data in the touched range via ReadData, and then write out all data in the touched range via WriteFile. If the Flush parameter is true, these operations will take place synchronously and block return of this method; otherwise, they will take place in the background and this method will return immediately.

.NET Standard Notes

To call this method in an asynchronous manner call TouchFileAsync instead. When the method completes (or an error is encountered) the TouchFileCompleted event will fire.

 
 
Copyright (c) 2020 Callback Technologies, Inc. - All rights reserved.
CBFS Cache 2020 .NET Edition - Version 20.0 [Build 7647]