Operating system API for accessing sparse files?
I need at least to test if a byte range in a file does really exist or is void.
It needs to work on the major Operating Systems: Unix (Linux/MacOSX/FreeBSD) and Windows.
I guess there is still no way to shoot holes into files or are there some file system specific API's and proposals? This would also be so great for log files.
On Windows, you can use FSCTL_GET_RETRIEVAL_POINTERS to find the mapping between file clusters and disk.
The corresponding Linux (and probably some other posixes) IOCTL is FIBMAP