Discuss this help topic in CBFS Forum

CallbackFileSystem.EnableRouteCache method


Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

CallbackFileSystem     See also    


Enables the local cache for files.


    procedure EnableRouteCache( Location : TCBString; Flags : integer );
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    void EnableRouteCache( const wchar_t * Location, DWORD Flags );

[C++ (VCL)]
    void __fastcall EnableRouteCache( TCBString Location, DWORD Flags );

[C++ (.NET)]
    void EnableRouteCache( String^ Location, UInt32 Flags );

    void EnableRouteCache( String Location, UInt32 Flags )

    Sub EnableRouteCache( ByVal Location As String, ByVal Flags as UInt32 )

    void enableRouteCache( String Location, UInt32 Flags )


  • Location - Specifies the location of the local file cache.
  • Flags - Operation flags (see below)

Values of Flags


Use this method to enable the local cache of files.

When the file is opened on the virtual disk and the local cache is enabled, the file is first looked for in the local cache. If the file is present, no callbacks / events are fired and all operations are performed on the local file.

The flags let you still get callbacks / events on the file, which is present in the cache. If you throw error from the callback / event handler, the corresponding operation will fail with the specified error code. If you use any of the *_CALLBACK flags, then CBFS_ROUTE_CACHE_OPEN_CALLBACK and CBFS_ROUTE_CACHE_CLOSE_CALLBACK are implied and the corresponding OnOpenFile and OnCloseFile callbacks / events will be called.

Call from...

This method may be called only from outside of callback / event handlers.

See also

DisableRouteCache method     RouteToFile method    

Discuss this help topic in CBFS Forum