This commit is contained in:
Igor Pavlov
2017-08-29 20:49:43 +01:00
committed by Kornel
parent 2efa10565a
commit b5dc853b24
110 changed files with 4714 additions and 1700 deletions

View File

@@ -128,6 +128,15 @@ bool SetFileAttrib(CFSTR path, DWORD attrib)
return false;
}
bool SetFileAttrib_PosixHighDetect(CFSTR path, DWORD attrib)
{
if ((attrib & 0xF0000000) != 0)
attrib &= 0x3FFF;
return SetFileAttrib(path, attrib);
}
bool RemoveDir(CFSTR path)
{
#ifndef _UNICODE

View File

@@ -15,7 +15,20 @@ bool GetWindowsDir(FString &path);
bool GetSystemDir(FString &path);
bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
bool SetFileAttrib(CFSTR path, DWORD attrib);
/*
Some programs store posix attributes in high 16 bits of windows attributes field.
Also some programs use additional flag markers: 0x8000 or 0x4000.
SetFileAttrib_PosixHighDetect() tries to detect posix field, and it extracts only attribute
bits that are related to current system only.
*/
bool SetFileAttrib_PosixHighDetect(CFSTR path, DWORD attrib);
bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
#ifndef UNDER_CE