 |
m2mb API docs
25.30.003
m2mb API sets documentation
|
Go to the documentation of this file.
24 #ifndef M2M_M2MB_FS_POSIX_H
25 #define M2M_M2MB_FS_POSIX_H
31 #define M2MB_O_RDONLY 00
32 #define M2MB_O_WRONLY 01
33 #define M2MB_O_RDWR 02
34 #define M2MB_O_LARGE 010
35 #define M2MB_O_CREAT 0100
36 #define M2MB_O_EXCL 0200
37 #define M2MB_O_NOCTTY 0400
38 #define M2MB_O_TRUNC 01000
39 #define M2MB_O_APPEND 02000
41 #ifndef M2M_M2MB_FS_STDIO_H
43 #define M2MB_SEEK_SET 0
44 #define M2MB_SEEK_CUR 1
45 #define M2MB_SEEK_END 2
50 #define M2MB_S_IRUSR 0400
51 #define M2MB_S_IWUSR 0200
52 #define M2MB_S_IXUSR 0100
53 #define M2MB_S_IRWXU 0700
55 #define M2MB_S_IRGRP 0040
56 #define M2MB_S_IWGRP 0020
57 #define M2MB_S_IXGRP 0010
58 #define M2MB_S_IRWXG 0070
60 #define M2MB_S_IROTH 0004
61 #define M2MB_S_IWOTH 0002
62 #define M2MB_S_IXOTH 0001
63 #define M2MB_S_IRWXO 0007
69 #define M2MB_ACCESSPERMS 0777
70 #define M2MB_ALLPERMS 0777
75 #define M2MB_S_IFDIR 0040000
77 #define M2MB_S_IFREG 0100000
81 #define M2MB_S_ISDIR( tempStat ) ( ( tempStat.st_mode & M2MB_S_IFDIR ) == M2MB_S_IFDIR )
82 #define M2MB_S_ISREG( tempStat ) ( ( tempStat.st_mode & M2MB_S_IFDIR ) == M2MB_S_IFDIR )
109 typedef struct M2MB_DIR_TAG M2MB_DIR_T;
174 INT32
m2mb_fs_open(
const CHAR *path, INT32 oflag, ... );
205 SSIZE_T
m2mb_fs_read( INT32 fd,
void *buf, SIZE_T nbyte );
236 SSIZE_T
m2mb_fs_write( INT32 fd,
const void *buf, SIZE_T nbyte );
INT32 m2mb_fs_unlink(const CHAR *path)
Delete file.
Definition: m2mb_fs_posix.h:99
INT32 m2mb_fs_fstat(INT32 fd, struct M2MB_STAT *buf)
File status.
OFF_T m2mb_fs_lseek(INT32 fd, OFF_T offset, INT32 whence)
Move file offset.
SSIZE_T m2mb_fs_write(INT32 fd, const void *buf, SIZE_T nbyte)
Write file.
M2MB_DIR_T * m2mb_fs_opendir(const CHAR *name)
Open directory as stream.
INT32 m2mb_fs_stat(const CHAR *path, struct M2MB_STAT *buf)
File status.
INT32 m2mb_fs_closedir(M2MB_DIR_T *dirp)
Close directory as stream.
Definition: m2mb_fs_posix.h:84
INT32 m2mb_fs_truncate(const CHAR *path, OFF_T length)
Truncate file.
INT32 m2mb_fs_open(const CHAR *path, INT32 oflag,...)
Open file.
INT32 m2mb_fs_close(INT32 fd)
Close file.
SSIZE_T m2mb_fs_read(INT32 fd, void *buf, SIZE_T nbyte)
Read file.
INT32 m2mb_fs_mkdir(const CHAR *path, MODE_T mode)
Create directory.
INT32 m2mb_fs_rmdir(const CHAR *path)
Remove directory.
INT32 m2mb_fs_statvfs(const CHAR *path, struct M2MB_STATVFS *buf)
File system statistics.
struct M2MB_DIRENT * m2mb_fs_readdir(M2MB_DIR_T *dirp)
Read directory as stream.
Definition: m2mb_fs_posix.h:111