https://issues.dlang.org/show_bug.cgi?id=21289
--- Comment #1 from Vital <[email protected]> --- I look into the std.file... function "existsImpl()"... ... version (Windows) { // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ // fileio/base/getfileattributes.asp return GetFileAttributesW(namez) != 0xFFFFFFFF; // INVALID_FILE_ATTRIBUTES } ... existsImpl() functions return "false" on file "c:\\hiberfil.sys". Because INVALID_FILE_ATTRIBUTES. It not correct? because file exists. I tried several ways: GetFileAttributesW(), GetFileAttributesExW(), FindFirstFileW(). Working solution : WIN32_FIND_DATAW fd; auto hFind = FindFirstFile ( "c:\\hiberfil.sys", &fd ); if ( hFind != INVALID_HANDLE_VALUE ) { writeln( "[ OK ]" ); FindClose( hFind ); } Of course solution above is a little slower than GetFileAttributes(), but work correct with .sys files. I will suggest using "FindFirstFileW()" in the "std.file: existsImpl()" there is no better solution yet. --
