RAD Studio
ContentsIndex
PreviousUpNext
_stati64, _tstati64, stati64, _wstati64

Header File 

sys\stat.h, tchar.h 

Category 

Directory Control Routines 

Prototype 

int stati64(const char *pathname, struct stati64 *buff); 

int _stati64(const char *__path, struct stati64 *__statbuf); 

int _wstati64(const wchar_t *pathname, struct stati64 *buff); 

// From tchar.h 

#define _tstati64 _stati64 

Description 

Gather statistics about the file named by *pathP and place them in the buffer *bufP. 

The statistics fields are set thus: 

st_devset to -1 if S_IFCHR, else set to drive holding the file. 

st_ino0 

st_modeUnix-style bit-set for file access rights 

st_nlink1 

st_uid0 

st_gid0 

st_rdevsame as st_dev 

st_sizefile size (0 if S_IFDIR or S_IFCHR) 

st_atimetime file last changed (seconds since 1970) 

st_mtimesame as st_atime 

st_ctimesame as st_atime 

The file access rights bit-set may contain S_IFCHR, S_IFDIR, S_IFREG, S_IREAD, S_IWRITE, or S_IEXEC. 

If the name is for a device, the time fields will be zero and the size field is undefined. 

Return Value 

The return value is 0 if the call was successful, otherwise -1 is returned and errno contains the reason. The buffer is not touched unless the call is successful. 

Portability  

POSIX 
Win32 
ANSI C 
ANSI C++ 
 
 
 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!