79546700

Date: 2025-03-31 16:06:48
Score: 1
Natty:
Report link

I was playing around and it seems that those are special files (sparse file? - no idea what it is), but all my files as on picture above returns TRUE with function below:

def is_sparse_file_win(path):
    try:
        import ctypes
        from ctypes import wintypes

        FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200
        GetFileAttributes = ctypes.windll.kernel32.GetFileAttributesW
        GetFileAttributes.argtypes = [wintypes.LPCWSTR]
        GetFileAttributes.restype = wintypes.DWORD

        attrs = GetFileAttributes(path)
        return attrs & FILE_ATTRIBUTE_SPARSE_FILE != 0
    except:
        return False
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Vladimir Buzalka