On Thu, 5 Jun 2003, Max Bowsher wrote: > I threw together a horrible C program to ask Windows whether a file was > sparse. .exe and .dll files made with a 1.5.0 Cygwin are. I haven't posted > the test program, because it is too messy.
#include <windows.h> #include <stdio.h> main(int argc, char * argv[]) { DWORD i = (argc > 1)? GetFileAttributes(argv[1]) : INVALID_FILE_ATTRIBUTES; if (i == INVALID_FILE_ATTRIBUTES) printf("Error for %s %ld\n", argv[1], GetLastError()); else printf("Sparse bit %x\n", i & FILE_ATTRIBUTE_SPARSE_FILE); } /: /a.exe a.exe Sparse bit 0 /: uname -a CYGWIN_NT-5.0 phumblet 1.5.0(0.86/3/2) 2003-05-28 19:47 i686 unknown unknown Cygwin Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/