IOCTL for file system statistics

Hi!
I am trying to get the following file statistics on Windows. Which IOCTL call will give this information?

File system Block Size - (equivalent of f_bsize in linux)
Num of free blocks - ( equivalent of f_bavail in linux)
Max file name length - (equivalent of f_namemax in linux)

FSCTL_GET_NTFS_VOLUME_DATA returns number of sectors (sector size). Is this same as block size?

Appreciate any pointers.

Thank you,
Vinod


http://www.mindtree.com/email/disclaimer.html

>>FSCTL_GET_NTFS_VOLUME_DATA returns number of sectors (sector size). Is this same as block size?

blocksize should be BytesPerCluster

I doubt whether this will work for FAT.

if you’re in usermode, I suggest you use GetDiskFreeSpace instead.
http://msdn.microsoft.com/en-us/library/aa364935(VS.85).aspx

as far as the file name goes, there is MAX_PATH, and there is a way to work with seriously long paths on NTFS, up to 3276-something unicode characters. Why would you want it?
http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx