GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
stat-wrappers.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2016-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_stat_wrappers_h)
27 #define octave_stat_wrappers_h 1
28 
29 #if defined __cplusplus
30 # include <ctime>
31 #else
32 # include <stdbool.h>
33 # include <time.h>
34 #endif
35 
36 #include <sys/types.h>
37 
38 #if defined __cplusplus
39 extern "C" {
40 #endif
41 
42 extern OCTAVE_API int octave_mkdir_wrapper (const char *name, mode_t mode);
43 
44 extern OCTAVE_API int octave_mkfifo_wrapper (const char *name, mode_t mode);
45 
46 extern OCTAVE_API int octave_umask_wrapper (mode_t mode);
47 
48 extern OCTAVE_API int
49 octave_stat_wrapper (const char *fname, mode_t *mode, ino_t *ino,
50  dev_t *dev, nlink_t *nlink, uid_t *uid,
51  gid_t *gid, off_t *size, time_t *atime,
52  time_t *mtime, time_t *ctime, dev_t *rdev,
53  long *blksize, long *blocks);
54 
55 extern OCTAVE_API int
56 octave_lstat_wrapper (const char *lname, mode_t *mode, ino_t *ino,
57  dev_t *dev, nlink_t *nlink, uid_t *uid,
58  gid_t *gid, off_t *size, time_t *atime,
59  time_t *mtime, time_t *ctime, dev_t *rdev,
60  long *blksize, long *blocks);
61 
62 extern OCTAVE_API int
63 octave_fstat_wrapper (int fid, mode_t *mode, ino_t *ino,
64  dev_t *dev, nlink_t *nlink, uid_t *uid,
65  gid_t *gid, off_t *size, time_t *atime,
66  time_t *mtime, time_t *ctime, dev_t *rdev,
67  long *blksize, long *blocks);
68 
69 extern OCTAVE_API bool octave_is_blk_wrapper (mode_t mode);
70 extern OCTAVE_API bool octave_is_chr_wrapper (mode_t mode);
71 extern OCTAVE_API bool octave_is_dir_wrapper (mode_t mode);
72 extern OCTAVE_API bool octave_is_fifo_wrapper (mode_t mode);
73 extern OCTAVE_API bool octave_is_lnk_wrapper (mode_t mode);
74 extern OCTAVE_API bool octave_is_reg_wrapper (mode_t mode);
75 extern OCTAVE_API bool octave_is_sock_wrapper (mode_t mode);
76 
80 
81 #if defined __cplusplus
82 }
83 #endif
84 
85 #endif
#define OCTAVE_API
Definition: main.cc:55
bool octave_is_lnk_wrapper(mode_t mode)
int octave_mkdir_wrapper(const char *name, mode_t mode)
Definition: stat-wrappers.c:49
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)
bool octave_is_reg_wrapper(mode_t mode)
int octave_mkfifo_wrapper(const char *name, mode_t mode)
Definition: stat-wrappers.c:63
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)
Definition: stat-wrappers.c:69
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)