4afb18b72c8b6ab6c2fe6cad931411c980ceb71b
5 #include <internal/file.h>
8 #include <internal/debug.h>
20 int _taccess( const _TCHAR
*_path
, int _amode
)
22 DWORD Attributes
= GetFileAttributes(_path
);
23 DPRINT(MK_STR(_taccess
)"('%"_TS
"', %x)\n", _path
, _amode
);
25 if (Attributes
== (DWORD
)-1) {
26 _dosmaperr(GetLastError());
29 if ((_amode
& W_OK
) == W_OK
) {
30 if ((Attributes
& FILE_ATTRIBUTE_READONLY
) == FILE_ATTRIBUTE_READONLY
) {
44 int access_dirT(const _TCHAR
*_path
)
46 DWORD Attributes
= GetFileAttributes(_path
);
47 DPRINT(MK_STR(is_dirT
)"('%"_TS
"')\n", _path
);
49 if (Attributes
== (DWORD
)-1) {
50 _dosmaperr(GetLastError());
54 if ((Attributes
& FILE_ATTRIBUTE_DIRECTORY
) != FILE_ATTRIBUTE_DIRECTORY
)