picox  0.1
xsinglefs.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_xsinglefs_h_
40 #define picox_filesystem_xsinglefs_h_
41 
42 
43 #include <picox/filesystem/xvfs.h>
44 
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49 
50 
71 void xsinglefs_init(XVirtualFs* vfs);
72 void xsinglefs_deinit();
73 XError xsinglefs_open(const char* path, XOpenMode mode, XFile** o_fp);
74 XError xsinglefs_mkdir(const char* path);
75 XError xsinglefs_opendir(const char* path, XDir** o_dir);
76 XError xsinglefs_chdir(const char* path);
77 XError xsinglefs_getcwd(char* buf, size_t size);
78 XError xsinglefs_remove(const char* path);
79 XError xsinglefs_rename(const char* oldpath, const char* newpath);
80 XError xsinglefs_stat(const char* path, XStat* statbuf);
81 XError xsinglefs_utime(const char* path, XTime time);
82 XError xsinglefs_copyfile(const char* src, const char* dst);
83 XError xsinglefs_copytree(const char* src, const char* dst);
84 XError xsinglefs_rmtree(const char* path);
85 XError xsinglefs_makedirs(const char* path, bool exist_ok);
86 XError xsinglefs_walktree(const char* path, XFsTreeWalker walker, void* userptr);
87 XError xsinglefs_exists(const char* path, bool* exists);
88 XError xsinglefs_is_directory(const char* path, bool* isdir);
89 XError xsinglefs_is_regular(const char* path, bool* isreg);
90 
91 #define xsinglefs_init_stream xvfs_init_stream
92 #define xsinglefs_close xvfs_close
93 #define xsinglefs_read xvfs_read
94 #define xsinglefs_write xvfs_write
95 #define xsinglefs_seek xvfs_seek
96 #define xsinglefs_tell xvfs_tell
97 #define xsinglefs_flush xvfs_flush
98 #define xsinglefs_readdir xvfs_readdir
99 #define xsinglefs_closedir xvfs_closedir
100 #define xsinglefs_putc xvfs_putc
101 #define xsinglefs_puts xvfs_puts
102 #define xsinglefs_printf xvfs_printf
103 #define xsinglefs_vprintf xvfs_vprintf
104 #define xsinglefs_getc xvfs_getc
105 #define xsinglefs_gets xvfs_gets
106 #define xsinglefs_copyfile2 xvfs_copyfile2
107 
108 
114 #ifdef __cplusplus
115 }
116 #endif /* __cplusplus */
117 
118 
119 #endif /* picox_filesystem_xsinglefs_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
ディレクトリ操作のハンドル構造体です
Definition: xfscore.h:82
ファイル情報を格納する構造体です
Definition: xfscore.h:92