CloseFileEx Method

Closes a cached file, specifying flushing and purging behaviors explicitly.

Syntax

public void CloseFileEx(string fileId, int flushAction, int purgeAction);
Public Sub CloseFileEx(ByVal FileId As String, ByVal FlushAction As Integer, ByVal PurgeAction As Integer)

Remarks

This method closes the cached file identified by FileId, performing any flushing and/or purging operations specified by the FlushAction and PurgeAction parameters.

The FlushAction parameter must be passed one of the following values:

FLUSH_DELAYED0Flush as usual, taking into account any specified delay.

The FlushAfterCloseDelay property specifies the delay. Passing this value to Close or CloseFileEx will cause the method to return immediately; flushing is performed in background.

FLUSH_NONE1Do not flush anything.

FLUSH_IMMEDIATE2Flush immediately.

Passing this value to Close or CloseFileEx will cause the method to return only after all flushing operations are complete.

Note that passing FLUSH_NONE will cause all background reading and writing threads for the file (if any) to be stopped.

The PurgeAction parameter must be passed one of the following values:

PURGE_DELAYED0Purge as usual, taking into account any specified delay.

The PurgeAfterCloseDelay property specifies the delay. Passing this value to Close or CloseFileEx will cause the method to return immediately; purging is performed in background.

PURGE_NONE1Do not purge anything.

PURGE_IMMEDIATE2Purge immediately.

Passing this value to Close or CloseFileEx will cause the method to return only after all purging operations are complete.

This method returns immediately, any flushing and/or purging operations are performed in the background.

.NET Standard Notes

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

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