creating sparse files on win32
trentm at ActiveState.com
Tue Jul 15 19:49:22 CEST 2003
[erick_bodine at attbi.com wrote]
> I need to create some sparse files on a win32 system (2000 & 2003
> Server) in order to do some testing of another application (not
> python). I have been poking around the win32all extensions (win32file
> specifically) that come w/ ActivePython but can't find anything that
> allows me to create a file with the 'sparse file attribute' set.
> Has anyone done this in python?
I haven't done this but MSDN teels me here:
that one needs to use the FSCTL_SET_SPARSE control:
The code sample on the latter link uses the DeviceIoControl() Win32 API
>>> import win32file
<built-in function DeviceIoControl>
Also use this to determine if the file system supports sparse files:
<built-in function GetVolumeInformation>
Hopefully that can give you a start.
TrentM at ActiveState.com
More information about the Python-list