File (C-API)¶
This page describes the C implementation of File¶
-
group
FILE Functions
-
a0_err_t
a0_file_open(const char *path, const a0_file_options_t *opt, a0_file_t *out) Open a file at the given path.
If the file does not exist, it will be created automatically.
A0_FILE_OPTIONS_DEFAULT is used if opt is NULL.
The file is zero-ed out when created.
-
a0_err_t
a0_file_close(a0_file_t*) Closes a file. The file still exists.
-
a0_err_t
a0_file_iter_init(a0_file_iter_t*, const char *path)
-
a0_err_t
a0_file_iter_next(a0_file_iter_t*, a0_file_iter_entry_t*)
-
a0_err_t
a0_file_iter_close(a0_file_iter_t*)
-
a0_err_t
a0_file_remove(const char *path) Removes the specified file.
-
a0_err_t
a0_file_remove_all(const char *path) Removes the specified file or directory, including all subdirectories.
Variables
-
const a0_file_options_t
A0_FILE_OPTIONS_DEFAULT Default file options.
On create: 16MB and universal read+write.
On open: shared read+write.
-
struct
a0_file_create_options_t¶ - #include <file.h>
Options for creating new files or directories.
These will not change existing files.
-
struct
a0_file_open_options_t¶ - #include <file.h>
Options for opening files.
-
struct
a0_file_options_t¶ - #include <file.h>
File options.
-
struct
a0_file_t¶ - #include <file.h>
File object.
-
struct
a0_file_iter_t¶ - #include <file.h>
-
struct
a0_file_iter_entry_t¶ - #include <file.h>
-
a0_err_t