win32file.SetFileInformationByHandle
SetFileInformationByHandle(File, FileInformationClass, Information)
Changes file characteristics by file handle
Parameters
Class | Type of input |
FileBasicInfo | Dict representing a FILE_BASIC_INFO struct, containing {"CreationTime":PyTime, "LastAccessTime":PyTime, "LastWriteTime":PyTime, "ChangeTime":PyTime, "FileAttributes":int} |
FileRenameInfo | Dict representing a FILE_RENAME_INFO struct, containing {"ReplaceIfExists":boolean, "RootDirectory":PyHANDLE, "FileName":str} MSDN says the RootDirectory is "A handle to the root directory in which the file to be renamed is located". However, this is actually the destination dir, can be None to stay in same dir. |
FileDispositionInfo | Boolean indicating if file should be deleted when handle is closed |
FileAllocationInfo | Int giving the allocation size. |
FileEndOfFileInfo | Int giving the EOF position, cannot be greater than allocated size. |
FileIoPriorityHintInfo | Int containing the IO priority (IoPriorityHint*) |
Comments
Available on Vista and later.Accepts keyword args.