Trying coreutils.exe cp --sparse=always filea fileb results in cp: --sparse is only supported on linux. However Windows supports sparse files:
DeviceIoControl( h, FSCTL_SET_SPARSE, 0, 0, 0, 0, 0, 0 ); is used to set the sparse flag. To skip over the parts that shouldn't be allocated the fseek is used just like on Linux or Mac, and the file is truncated with SetFilePointerEx and SetEndOfFile.
Trying
coreutils.exe cp --sparse=always filea filebresults incp: --sparse is only supported on linux. However Windows supports sparse files:DeviceIoControl( h, FSCTL_SET_SPARSE, 0, 0, 0, 0, 0, 0 );is used to set the sparse flag. To skip over the parts that shouldn't be allocated thefseekis used just like on Linux or Mac, and the file is truncated with SetFilePointerEx and SetEndOfFile.