32#if defined( _MSC_VER ) || !defined( USE_MSYS2_FALLBACK )
35 HANDLE hFile = INVALID_HANDLE_VALUE;
36 hFile = CreateFileW( aPath.wc_str(),
41 FILE_FLAG_SEQUENTIAL_SCAN,
44 if (hFile == INVALID_HANDLE_VALUE)
49 int fd = _open_osfhandle(
reinterpret_cast<intptr_t
>( hFile ), 0 );
58 FILE* fp = _fdopen( fd, aMode.c_str() );
69 return wxFopen( aPath, aMode );
79 if( GetFileSecurity( aSrc.wc_str(),
80 OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
88 BYTE* pSD =
new BYTE[dwSize];
90 PSECURITY_DESCRIPTOR pSD =
static_cast<PSECURITY_DESCRIPTOR
>(
new BYTE[dwSize] );
96 if( !GetFileSecurity( aSrc.wc_str(),
97 OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION
98 | DACL_SECURITY_INFORMATION, pSD, dwSize, &dwSize ) )
105 if( !SetFileSecurity( aDest.wc_str(),
106 OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION
107 | DACL_SECURITY_INFORMATION, pSD ) )
122 if( ( GetFileAttributesW( aFileName.fn_str() ) & FILE_ATTRIBUTE_HIDDEN ) )