Skip to content

On Windows, utk::file_resize does not create sparse files #8

@ghost

Description

I tried to use these parts of Daniel's code and they did not create sparse files on Windows 10.
I found the following solution (See here) that might prove useful:

Use the DeviceIoControl function with the FSCTL_SET_SPARSE control
code to mark the file as sparse. If you don't mark the file as sparse,
the FSCTL_SET_ZERO_DATA control code will actually write zero bytes to
the file instead of marking the region as sparse zero area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions