ReactOS 0.4.15-dev-7788-g1ad9096
stat.h File Reference
#include <crtdefs.h>
#include <sys/types.h>
Include dependency graph for stat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _stat32
 
struct  _stat
 
struct  stat
 

Macros

#define _STAT_DEFINED
 
#define __stat64   _stat64
 
#define _S_IFMT   0xF000
 
#define _S_IFDIR   0x4000
 
#define _S_IFCHR   0x2000
 
#define _S_IFIFO   0x1000
 
#define _S_IFREG   0x8000
 
#define _S_IREAD   0x0100
 
#define _S_IWRITE   0x0080
 
#define _S_IEXEC   0x0040
 
#define _WSTAT_DEFINED
 
#define _fstat64i32   _fstat
 
#define _S_IFBLK   0x3000 /* Block: Is this ever set under w32? */
 
#define S_IFMT   _S_IFMT
 
#define S_IFDIR   _S_IFDIR
 
#define S_IFCHR   _S_IFCHR
 
#define S_IFREG   _S_IFREG
 
#define S_IREAD   _S_IREAD
 
#define S_IWRITE   _S_IWRITE
 
#define S_IEXEC   _S_IEXEC
 
#define S_IFIFO   _S_IFIFO
 
#define S_IFBLK   _S_IFBLK
 
#define _S_IRWXU   (_S_IREAD | _S_IWRITE | _S_IEXEC)
 
#define _S_IXUSR   _S_IEXEC
 
#define _S_IWUSR   _S_IWRITE
 
#define S_IRWXU   _S_IRWXU
 
#define S_IXUSR   _S_IXUSR
 
#define S_IWUSR   _S_IWUSR
 
#define S_IRUSR   _S_IRUSR
 
#define _S_IRUSR   _S_IREAD
 
#define S_ISDIR(m)   (((m) & S_IFMT) == S_IFDIR)
 
#define S_ISFIFO(m)   (((m) & S_IFMT) == S_IFIFO)
 
#define S_ISCHR(m)   (((m) & S_IFMT) == S_IFCHR)
 
#define S_ISBLK(m)   (((m) & S_IFMT) == S_IFBLK)
 
#define S_ISREG(m)   (((m) & S_IFMT) == S_IFREG)
 

Functions

_CRTIMP int __cdecl _fstat (_In_ int _FileDes, _Out_ struct _stat *_Stat)
 
_CRTIMP int __cdecl _fstat32 (_In_ int _FileDes, _Out_ struct _stat32 *_Stat)
 
_CRTIMP int __cdecl _stat (_In_z_ const char *_Name, _Out_ struct _stat *_Stat)
 
_CRTIMP int __cdecl _stat32 (_In_z_ const char *_Name, _Out_ struct _stat32 *_Stat)
 
_CRTIMP int __cdecl _wstat (_In_z_ const wchar_t *_Name, _Out_ struct _stat *_Stat)
 
_CRTIMP int __cdecl _wstat32 (_In_z_ const wchar_t *_Name, _Out_ struct _stat32 *_Stat)
 
__CRT_INLINE int __cdecl _fstat32 (int _FileDes, struct _stat32 *_Stat)
 
__CRT_INLINE int __cdecl _fstat32i64 (int _FileDes, struct _stat32i64 *_Stat)
 
_CRTIMP int __cdecl stat (const char *_Filename, struct stat *_Stat)
 
_CRTIMP int __cdecl fstat (int _Desc, struct stat *_Stat)
 
_CRTIMP int __cdecl wstat (const wchar_t *_Filename, struct stat *_Stat)
 

Macro Definition Documentation

◆ __stat64

#define __stat64   _stat64

Definition at line 129 of file stat.h.

◆ _fstat64i32

#define _fstat64i32   _fstat

Compatibility definitons

Definition at line 269 of file stat.h.

◆ _S_IEXEC

#define _S_IEXEC   0x0040

Definition at line 140 of file stat.h.

◆ _S_IFBLK

#define _S_IFBLK   0x3000 /* Block: Is this ever set under w32? */

Definition at line 309 of file stat.h.

◆ _S_IFCHR

#define _S_IFCHR   0x2000

Definition at line 135 of file stat.h.

◆ _S_IFDIR

#define _S_IFDIR   0x4000

Definition at line 134 of file stat.h.

◆ _S_IFIFO

#define _S_IFIFO   0x1000

Definition at line 136 of file stat.h.

◆ _S_IFMT

#define _S_IFMT   0xF000

Definition at line 133 of file stat.h.

◆ _S_IFREG

#define _S_IFREG   0x8000

Definition at line 137 of file stat.h.

◆ _S_IREAD

#define _S_IREAD   0x0100

Definition at line 138 of file stat.h.

◆ _S_IRUSR

#define _S_IRUSR   _S_IREAD

Definition at line 329 of file stat.h.

◆ _S_IRWXU

#define _S_IRWXU   (_S_IREAD | _S_IWRITE | _S_IEXEC)

Definition at line 321 of file stat.h.

◆ _S_IWRITE

#define _S_IWRITE   0x0080

Definition at line 139 of file stat.h.

◆ _S_IWUSR

#define _S_IWUSR   _S_IWRITE

Definition at line 323 of file stat.h.

◆ _S_IXUSR

#define _S_IXUSR   _S_IEXEC

Definition at line 322 of file stat.h.

◆ _STAT_DEFINED

#define _STAT_DEFINED

This file has no copyright assigned and is placed in the Public Domain. This file is part of the w64 mingw-runtime package. No warranty is given; refer to the file DISCLAIMER within this package.

Definition at line 24 of file stat.h.

◆ _WSTAT_DEFINED

#define _WSTAT_DEFINED

Definition at line 217 of file stat.h.

◆ S_IEXEC

#define S_IEXEC   _S_IEXEC

Definition at line 317 of file stat.h.

◆ S_IFBLK

#define S_IFBLK   _S_IFBLK

Definition at line 319 of file stat.h.

◆ S_IFCHR

#define S_IFCHR   _S_IFCHR

Definition at line 313 of file stat.h.

◆ S_IFDIR

#define S_IFDIR   _S_IFDIR

Definition at line 312 of file stat.h.

◆ S_IFIFO

#define S_IFIFO   _S_IFIFO

Definition at line 318 of file stat.h.

◆ S_IFMT

#define S_IFMT   _S_IFMT

Definition at line 311 of file stat.h.

◆ S_IFREG

#define S_IFREG   _S_IFREG

Definition at line 314 of file stat.h.

◆ S_IREAD

#define S_IREAD   _S_IREAD

Definition at line 315 of file stat.h.

◆ S_IRUSR

#define S_IRUSR   _S_IRUSR

Definition at line 328 of file stat.h.

◆ S_IRWXU

#define S_IRWXU   _S_IRWXU

Definition at line 325 of file stat.h.

◆ S_ISBLK

#define S_ISBLK (   m)    (((m) & S_IFMT) == S_IFBLK)

Definition at line 334 of file stat.h.

◆ S_ISCHR

#define S_ISCHR (   m)    (((m) & S_IFMT) == S_IFCHR)

Definition at line 333 of file stat.h.

◆ S_ISDIR

#define S_ISDIR (   m)    (((m) & S_IFMT) == S_IFDIR)

Definition at line 331 of file stat.h.

◆ S_ISFIFO

#define S_ISFIFO (   m)    (((m) & S_IFMT) == S_IFIFO)

Definition at line 332 of file stat.h.

◆ S_ISREG

#define S_ISREG (   m)    (((m) & S_IFMT) == S_IFREG)

Definition at line 335 of file stat.h.

◆ S_IWRITE

#define S_IWRITE   _S_IWRITE

Definition at line 316 of file stat.h.

◆ S_IWUSR

#define S_IWUSR   _S_IWUSR

Definition at line 327 of file stat.h.

◆ S_IXUSR

#define S_IXUSR   _S_IXUSR

Definition at line 326 of file stat.h.

Function Documentation

◆ _fstat()

_CRTIMP int __cdecl _fstat ( _In_ int  _FileDes,
_Out_ struct _stat _Stat 
)

Referenced by _fstat32(), CRTDLL__fstat(), and fstat().

◆ _fstat32() [1/2]

_CRTIMP int __cdecl _fstat32 ( _In_ int  _FileDes,
_Out_ struct _stat32 _Stat 
)

◆ _fstat32() [2/2]

__CRT_INLINE int __cdecl _fstat32 ( int  _FileDes,
struct _stat32 _Stat 
)

Definition at line 270 of file stat.h.

271 {
272 struct _stat _Stat64;
273 int ret = _fstat(_FileDes, &_Stat64);
274 _Stat->st_dev = _Stat64.st_dev;
275 _Stat->st_ino = _Stat64.st_ino;
276 _Stat->st_mode = _Stat64.st_mode;
277 _Stat->st_nlink = _Stat64.st_nlink;
278 _Stat->st_uid = _Stat64.st_uid;
279 _Stat->st_gid = _Stat64.st_gid;
280 _Stat->st_rdev = _Stat64.st_rdev;
281 _Stat->st_size = _Stat64.st_size;
282 _Stat->st_atime = (__time32_t)_Stat64.st_atime;
283 _Stat->st_mtime = (__time32_t)_Stat64.st_mtime;
284 _Stat->st_ctime = (__time32_t)_Stat64.st_ctime;
285 return ret;
286 }
long __time32_t
Definition: crtdefs.h:379
_CRTIMP int __cdecl _fstat(_In_ int _FileDes, _Out_ struct _stat *_Stat)
short st_uid
Definition: stat.h:31
_dev_t st_rdev
Definition: stat.h:33
short st_gid
Definition: stat.h:32
unsigned short st_mode
Definition: stat.h:29
__time32_t st_mtime
Definition: stat.h:36
_dev_t st_dev
Definition: stat.h:27
__time32_t st_ctime
Definition: stat.h:37
_ino_t st_ino
Definition: stat.h:28
__time32_t st_atime
Definition: stat.h:35
short st_nlink
Definition: stat.h:30
_off_t st_size
Definition: stat.h:34
Definition: stat.h:40
int ret

◆ _fstat32i64()

__CRT_INLINE int __cdecl _fstat32i64 ( int  _FileDes,
struct _stat32i64 *  _Stat 
)

Definition at line 287 of file stat.h.

288 {
289 struct _stat64 _Stat64;
290 int ret = _fstat64(_FileDes, &_Stat64);
291 _Stat->st_dev = _Stat64.st_dev;
292 _Stat->st_ino = _Stat64.st_ino;
293 _Stat->st_mode = _Stat64.st_mode;
294 _Stat->st_nlink = _Stat64.st_nlink;
295 _Stat->st_uid = _Stat64.st_uid;
296 _Stat->st_gid = _Stat64.st_gid;
297 _Stat->st_rdev = _Stat64.st_rdev;
298 _Stat->st_size = _Stat64.st_size;
299 _Stat->st_atime = (__time32_t)_Stat64.st_atime;
300 _Stat->st_mtime = (__time32_t)_Stat64.st_mtime;
301 _Stat->st_ctime = (__time32_t)_Stat64.st_ctime;
302 return ret;
303 }
int CDECL _fstat64(int fd, struct __stat64 *buf)
Definition: stat64.c:102

◆ _stat()

_CRTIMP int __cdecl _stat ( _In_z_ const char _Name,
_Out_ struct _stat _Stat 
)

◆ _stat32()

_CRTIMP int __cdecl _stat32 ( _In_z_ const char _Name,
_Out_ struct _stat32 _Stat 
)

◆ _wstat()

_CRTIMP int __cdecl _wstat ( _In_z_ const wchar_t _Name,
_Out_ struct _stat _Stat 
)

Referenced by wstat().

◆ _wstat32()

_CRTIMP int __cdecl _wstat32 ( _In_z_ const wchar_t _Name,
_Out_ struct _stat32 _Stat 
)

◆ fstat()

__CRT_INLINE int __cdecl fstat ( int  _Desc,
struct stat _Stat 
)

Definition at line 341 of file stat.h.

341 {
342 return _fstat(_Desc,(struct _stat *)_Stat);
343}

◆ stat()

__CRT_INLINE int __cdecl stat ( const char _Filename,
struct stat _Stat 
)

Definition at line 345 of file stat.h.

345 {
346 return _stat(_Filename,(struct _stat *)_Stat);
347}

◆ wstat()

__CRT_INLINE int __cdecl wstat ( const wchar_t _Filename,
struct stat _Stat 
)

Definition at line 349 of file stat.h.

349 {
350 return _wstat(_Filename,(struct _stat *)_Stat);
351}
_CRTIMP int __cdecl _wstat(_In_z_ const wchar_t *_Name, _Out_ struct _stat *_Stat)