3 #include <msvcrt/errno.h>
5 #include <msvcrt/msvcrtdbg.h>
8 int _waccess(const wchar_t *_path, int _amode)
10 DWORD Attributes = GetFileAttributesW(_path);
12 if (Attributes == -1) {
16 if ((_amode & W_OK) == W_OK) {
17 if ((Attributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY) {
22 if ((_amode & D_OK) == D_OK) {
23 if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) {