ReactOS 0.4.16-dev-937-g7afcd2a
wchmod.cpp File Reference
#include <corecrt_internal.h>
#include <io.h>
#include <sys/stat.h>
Include dependency graph for wchmod.cpp:

Go to the source code of this file.

Functions

int __cdecl _wchmod (wchar_t const *const path, int const mode)
 

Function Documentation

◆ _wchmod()

int __cdecl _wchmod ( wchar_t const *const  path,
int const  mode 
)

Definition at line 17 of file wchmod.cpp.

18{
20
23 {
25 return -1;
26 }
27
28 // Set or clear the read-only flag:
29 if (mode & _S_IWRITE)
30 {
31 attributes.dwFileAttributes &= ~FILE_ATTRIBUTE_READONLY;
32 }
33 else
34 {
36 }
37
39 {
41 return -1;
42 }
43
44 return 0;
45}
#define EINVAL
Definition: acclib.h:90
void __cdecl __acrt_errno_map_os_error(unsigned long)
Definition: errno.cpp:91
#define _S_IWRITE
Definition: cabinet.h:33
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:794
BOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation)
Definition: fileinfo.c:552
GLenum mode
Definition: glext.h:6217
#define _VALIDATE_CLEAR_OSSERR_RETURN(expr, errorcode, retexpr)
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
@ GetFileExInfoStandard
Definition: winbase.h:1192