Cain I get the Cluster size ?

  • Thread starter Thread starter ±èÀçȲ
  • Start date Start date
±

±èÀçȲ

Hello

Can I get the size of cluster ?

On windows command, you get cluster size following command.

How Can I this in c# ?


C:\>fsutil fsinfo ntfsinfo c:

..

..

..

cluster size: 4096

..

..

..

..

C:\>
 
On W2K3 you can use the System.Management classes and WMI class
win32_volume to retrieve the cluster size.
On XP you need to PInvoke the CreateFile, DeviceIoControl and CloseHandle
Win32 API's.

Willy.
 
Back
Top