Discuss this help topic in CBFS Forum

CallbackFileSystem.CallSetEndOfFileOnWrite property

Filter:

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

CallbackFileSystem     See also    

Overview

Specifies whether OnSetEndOfFile should be called before OnWrite in cases, when writing would expand the file.

Declaration

[Pascal]
    property CallSetEndOfFileOnWrite : boolean;

[C++ (Lib)]
    bool GetCallSetEndOfFileOnWrite();
    void SetCallSetEndOfFileOnWrite(BOOL Value);

[C++ (VCL)]
    bool CallSetEndOfFileOnWrite;

[C++ (.NET)]
    bool CallSetEndOfFileOnWrite;

[C#]
    bool CallSetEndOfFileOnWrite;

[VB.NET]
    Public Property CallSetEndOfFileOnWrite As Boolean

[Java]
    boolean getCallSetEndOfFileOnWrite();
    void setCallSetEndOfFileOnWrite(boolean value)

Description

If CallSetEndOfFileOnWrite is set to true and a write operation, which extends the files' end of file, is performed, then CBFS triggers OnSetEndOfFile callback /event first; and if this operation is successful, then the data is either written to the file data cache or OnWrite callback /event handler is called. This approach allows your code to report error to the originator of the write request in the case, when it is not possible to expand the file (e.g. due to insufficient disk space).

In case CallSetEndOfFileOnWrite is set to false, OnSetEndOfFile callback /event handler is not called on file expansion. This setting allows to minimize the number of callback calls. But if the data is written to the file data cache first, then OnWrite callback /event handler is called later (during the cache flushing), and in case of error on file expansion not the originator of the request is notified about the error, but the operating system itself shows a notification dialog on the active desktop with information, that writing to the file has failed.

By default CallSetEndOfFileOnWrite is set to true.

See also

OnSetEndOfFile event     OnWriteFile event    

Discuss this help topic in CBFS Forum