SetFileSize Method

Sets the "real size" of a cached file.

Syntax

public void SetFileSize(string fileId, long newSize, bool fetchMissingData);
Public Sub SetFileSize(ByVal FileId As String, ByVal NewSize As Long, ByVal FetchMissingData As Boolean)

Remarks

This method changes the "real size" of the cached file identified by FileId to the number of bytes specified by NewSize. The cached file must be opened using OpenFile before its real size can be changed.

The FetchMissingData parameter controls how the cache initializes new file space in cases where the file's real size is increased. If FetchMissingData is true, the new file space is filled with real data fetched from external storage. Otherwise, the new file space is marked as zero-filled (though no actual data writing occurs).

.NET Standard Notes

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

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