Discuss this help topic in CBFS Forum

CallbackFileSystem.ClusterSize property

Filter:

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

CallbackFileSystem    

Overview

Specifies the size of the cluster of the virtual disk.

Declaration

[Pascal]
    property ClusterSize : LongWord;

[C++ (Lib)]
    WORD GetClusterSize();
    void SetClusterSize(WORD Value);

[C++ (VCL)]
    unsigned long ClusterSize;

[C++ (.NET)]
    UInt32 ClusterSize;

[C#]
    UInt32 ClusterSize;

[VB.NET]
    Public Property ClusterSize As UInt32

[Java]
    int getClusterSize();
    void setClusterSize(int value);

Description

Use this property to specify, how many bytes the virtual "cluster" on your disk contains. The value must be a multiple of sector size. Default value of 0 tells the driver to have cluster size equal to sector size.

All file systems used in Windows organize hard disk based on cluster size (also known as allocation unit size). Cluster size represents the smallest amount of disk space that can be used to hold a file. Common cluster sizes for FAT and NTFS are 4096, 8192 and 16384 bytes.

For Callback File System it doesn't matter what size of cluster is, but some applications request cluster size to calculate the buffer size used to transfer data in the read and write operations. So setting the cluster size to some larger value can increase speed of data transfer by decreasing the number of OnReadFile and OnWriteFile callbacks called.

Discuss this help topic in CBFS Forum