How do I create a sparse file programmatically, in C, on Mac OS X?

后端 未结 7 1479
谎友^
谎友^ 2020-12-19 03:00

I\'d like to create a sparse file such that all-zero blocks don\'t take up actual disk space until I write data to them. Is it possible?

7条回答
  •  抹茶落季
    2020-12-19 03:48

    This thread becomes a comprehensive source of info about the sparse files. Here is the missing part for Win32:

    Decent article with examples

    Tool that estimates if it makes sense to make file as sparse

    Regards

提交回复
热议问题