picox  0.1
xunionfs.h
[詳解]
1 
14 /*
15  * License: MIT license
16  * Copyright (c) <2016> <MaskedW [maskedw00@gmail.com]>
17  *
18  * Permission is hereby granted, free of charge, to any person
19  * obtaining a copy of this software and associated documentation
20  * files (the "Software"), to deal in the Software without
21  * restriction, including without limitation the rights to use, copy,
22  * modify, merge, publish, distribute, sublicense, and/or sell copies
23  * of the Software, and to permit persons to whom the Software is
24  * furnished to do so, subject to the following conditions:
25  *
26  * The above copyright notice and this permission notice shall be
27  * included in all copies or substantial portions of the Software.
28  *
29  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
33  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
34  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
35  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36  * SOFTWARE.
37  */
38 
39 #ifndef picox_filesystem_xunionfs_h_
40 #define picox_filesystem_xunionfs_h_
41 
42 
43 #include <picox/filesystem/xvfs.h>
44 
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49 
50 
75 void xunionfs_init();
76 
77 
80 void xunionfs_deinit();
81 
82 
99 XError xunionfs_mount(XVirtualFs* vfs, const char* path, const char* realpath);
100 
101 
107 XError xunionfs_umount(const char* path);
108 
109 
110 XError xunionfs_open(const char* path, XOpenMode mode, XFile** o_fp);
111 XError xunionfs_mkdir(const char* path);
112 XError xunionfs_opendir(const char* path, XDir** o_dir);
113 XError xunionfs_chdir(const char* path);
114 XError xunionfs_getcwd(char* buf, size_t size);
115 XError xunionfs_remove(const char* path);
116 XError xunionfs_rename(const char* oldpath, const char* newpath);
117 XError xunionfs_stat(const char* path, XStat* statbuf);
118 XError xunionfs_utime(const char* path, XTime time);
119 XError xunionfs_copyfile(const char* src, const char* dst);
120 XError xunionfs_copytree(const char* src, const char* dst);
121 XError xunionfs_rmtree(const char* path);
122 XError xunionfs_makedirs(const char* path, bool exist_ok);
123 XError xunionfs_walktree(const char* path, XFsTreeWalker walker, void* userptr);
124 XError xunionfs_exists(const char* path, bool* exists);
125 XError xunionfs_is_directory(const char* path, bool* isdir);
126 XError xunionfs_is_regular(const char* path, bool* isreg);
127 
128 #define xunionfs_init_stream xvfs_init_stream
129 #define xunionfs_close xvfs_close
130 #define xunionfs_read xvfs_read
131 #define xunionfs_write xvfs_write
132 #define xunionfs_seek xvfs_seek
133 #define xunionfs_tell xvfs_tell
134 #define xunionfs_flush xvfs_flush
135 #define xunionfs_readdir xvfs_readdir
136 #define xunionfs_closedir xvfs_closedir
137 #define xunionfs_putc xvfs_putc
138 #define xunionfs_puts xvfs_puts
139 #define xunionfs_printf xvfs_printf
140 #define xunionfs_vprintf xvfs_vprintf
141 #define xunionfs_getc xvfs_getc
142 #define xunionfs_gets xvfs_gets
143 #define xunionfs_copyfile2 xvfs_copyfile2
144 
145 
151 #ifdef __cplusplus
152 }
153 #endif /* __cplusplus */
154 
155 
156 #endif /* picox_filesystem_xunionfs_h_ */
Definition: xfscore.h:182
uint32_t XTime
time_tの代替をするシステム時刻を格納するための型です
Definition: xtime.h:80
XOpenMode
ファイルオープン等のモードです
Definition: xstddef.h:435
XError
errnoの代替として使用する共通のエラーコードを表す列挙型です
Definition: xstddef.h:367
bool(* XFsTreeWalker)(void *userptr, const char *path, const XStat *statbuf, const XDirEnt *dirent)
ディレクトリ探索関数が呼び出すコールバック関数型です
Definition: xfscore.h:124
ファイル操作のハンドル構造体です
Definition: xfscore.h:70
XError xunionfs_umount(const char *path)
ファイルシステムのマウントを解除(アンマウント)します
Definition: xunionfs.c:246
void xunionfs_deinit()
xunionfsの終了処理を行います。
Definition: xunionfs.c:135
XError xunionfs_mount(XVirtualFs *vfs, const char *path, const char *realpath)
仮想ファイルシステムをディレクトリツリーに接続します
Definition: xunionfs.c:155
void xunionfs_init()
xunionfsの初期化を行います
Definition: xunionfs.c:126
ディレクトリ操作のハンドル構造体です
Definition: xfscore.h:82
ファイル情報を格納する構造体です
Definition: xfscore.h:92