31 #if defined (HAVE_CONFIG_H)
37 #include <sys/types.h>
43 #if defined (OCTAVE_USE_WINDOWS_API)
51 #if defined (OCTAVE_USE_WINDOWS_API)
53 int status = _wmkdir (wname);
54 free ((
void *) wname);
55 octave_unused_parameter (mode);
76 dev_t *dev, nlink_t *nlink, uid_t *uid,
77 gid_t *gid, off_t *size, time_t *atime,
78 time_t *mtime, time_t *ctime, dev_t *rdev,
79 long *blksize,
long *blocks)
84 *nlink = buf->st_nlink;
88 *atime = buf->st_atime;
89 *mtime = buf->st_mtime;
90 *ctime = buf->st_ctime;
92 #if defined (HAVE_STRUCT_STAT_ST_RDEV)
98 #if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
99 *blksize = buf->st_blksize;
104 #if defined (HAVE_STRUCT_STAT_ST_BLOCKS)
105 *blocks = buf->st_blocks;
113 dev_t *dev, nlink_t *nlink, uid_t *uid,
114 gid_t *gid, off_t *size, time_t *atime,
115 time_t *mtime, time_t *ctime, dev_t *rdev,
116 long *blksize,
long *blocks)
120 #if defined (OCTAVE_USE_WINDOWS_API)
122 int status = _wstati64 (wfname, &buf);
123 free ((
void *) wfname);
125 int status =
stat (fname, &buf);
129 atime, mtime, ctime, rdev, blksize, blocks);
136 dev_t *dev, nlink_t *nlink, uid_t *uid,
137 gid_t *gid, off_t *size, time_t *atime,
138 time_t *mtime, time_t *ctime, dev_t *rdev,
139 long *blksize,
long *blocks)
143 #if defined (OCTAVE_USE_WINDOWS_API)
146 int status = _wstati64 (wlname, &buf);
147 free ((
void *) wlname);
149 int status = lstat (lname, &buf);
153 atime, mtime, ctime, rdev, blksize, blocks);
160 dev_t *dev, nlink_t *nlink, uid_t *uid,
161 gid_t *gid, off_t *size, time_t *atime,
162 time_t *mtime, time_t *ctime, dev_t *rdev,
163 long *blksize,
long *blocks)
167 int status = fstat (fid, &buf);
170 atime, mtime, ctime, rdev, blksize, blocks);
175 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
179 #pragma GCC diagnostic push
180 #pragma GCC diagnostic ignored "-Wunused-parameter"
186 #if defined (S_ISBLK)
187 return S_ISBLK (mode);
196 #if defined (S_ISCHR)
197 return S_ISCHR (mode);
206 #if defined (S_ISDIR)
207 return S_ISDIR (mode);
216 #if defined (S_ISFIFO)
217 return S_ISFIFO (mode);
226 #if defined (S_ISLNK)
227 return S_ISLNK (mode);
236 #if defined (S_ISREG)
237 return S_ISREG (mode);
246 #if defined (S_ISSOCK)
247 return S_ISSOCK (mode);
253 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
255 #pragma GCC diagnostic pop
261 #if defined (HAVE_STRUCT_STAT_ST_RDEV)
271 #if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
281 #if defined (HAVE_STRUCT_STAT_ST_BLOCKS)
int mkdir(const std::string &nm, mode_t md)
int mkfifo(const std::string &nm, mode_t md)
bool octave_is_lnk_wrapper(mode_t mode)
int octave_mkdir_wrapper(const char *name, mode_t mode)
bool octave_is_chr_wrapper(mode_t mode)
bool octave_is_fifo_wrapper(mode_t mode)
bool octave_have_struct_stat_st_rdev(void)
bool octave_have_struct_stat_st_blocks(void)
int octave_fstat_wrapper(int fid, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
bool octave_is_blk_wrapper(mode_t mode)
bool octave_is_dir_wrapper(mode_t mode)
static void assign_stat_fields(struct stat *buf, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
bool octave_is_reg_wrapper(mode_t mode)
int octave_mkfifo_wrapper(const char *name, mode_t mode)
int octave_lstat_wrapper(const char *lname, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
int octave_umask_wrapper(mode_t mode)
bool octave_is_sock_wrapper(mode_t mode)
int octave_stat_wrapper(const char *fname, mode_t *mode, ino_t *ino, dev_t *dev, nlink_t *nlink, uid_t *uid, gid_t *gid, off_t *size, time_t *atime, time_t *mtime, time_t *ctime, dev_t *rdev, long *blksize, long *blocks)
bool octave_have_struct_stat_st_blksize(void)
subroutine stat(x, n, av, var, xmin, xmax)
wchar_t * u8_to_wchar(const char *u8)