fx.io: convert to assembly build system
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#ifndef FX_IO_DIRECTORY_H_
|
||||
#define FX_IO_DIRECTORY_H_
|
||||
|
||||
#include <fx/core/error.h>
|
||||
#include <fx/core/iterator.h>
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/core/misc.h>
|
||||
#include <fx/error.h>
|
||||
#include <fx/io/file.h>
|
||||
#include <fx/io/path.h>
|
||||
#include <fx/iterator.h>
|
||||
#include <fx/macros.h>
|
||||
#include <fx/misc.h>
|
||||
|
||||
#define FX_DIRECTORY_ROOT ((fx_directory *)NULL)
|
||||
|
||||
@@ -49,7 +49,9 @@ FX_API fx_type fx_directory_get_type(void);
|
||||
FX_API fx_type fx_directory_iterator_get_type(void);
|
||||
|
||||
FX_API fx_result fx_directory_open(
|
||||
fx_directory *root, const fx_path *path, fx_directory_open_flags flags,
|
||||
fx_directory *root,
|
||||
const fx_path *path,
|
||||
fx_directory_open_flags flags,
|
||||
fx_directory **out);
|
||||
FX_API fx_result fx_directory_open_temp(fx_directory **out);
|
||||
FX_API const fx_path *fx_directory_get_path(const fx_directory *dir);
|
||||
@@ -58,17 +60,26 @@ FX_API const char *fx_directory_get_path_cstr(const fx_directory *dir);
|
||||
FX_API const char *fx_directory_get_rel_path_cstr(const fx_directory *dir);
|
||||
FX_API fx_result fx_directory_delete(fx_directory *dir);
|
||||
|
||||
FX_API bool fx_directory_path_exists(const fx_directory *root, const fx_path *path);
|
||||
FX_API bool fx_directory_path_is_file(const fx_directory *root, const fx_path *path);
|
||||
FX_API bool fx_directory_path_exists(
|
||||
const fx_directory *root,
|
||||
const fx_path *path);
|
||||
FX_API bool fx_directory_path_is_file(
|
||||
const fx_directory *root,
|
||||
const fx_path *path);
|
||||
FX_API bool fx_directory_path_is_directory(
|
||||
const fx_directory *root, const fx_path *path);
|
||||
const fx_directory *root,
|
||||
const fx_path *path);
|
||||
FX_API fx_result fx_directory_path_stat(
|
||||
const fx_directory *root, const fx_path *path, struct fx_file_info *out);
|
||||
const fx_directory *root,
|
||||
const fx_path *path,
|
||||
struct fx_file_info *out);
|
||||
FX_API fx_result fx_directory_path_unlink(
|
||||
const fx_directory *root, const fx_path *path);
|
||||
const fx_directory *root,
|
||||
const fx_path *path);
|
||||
|
||||
FX_API fx_iterator *fx_directory_begin(
|
||||
fx_directory *dir, fx_directory_iterator_flags flags);
|
||||
fx_directory *dir,
|
||||
fx_directory_iterator_flags flags);
|
||||
|
||||
FX_DECLS_END;
|
||||
|
||||
|
||||
+21
-11
@@ -1,10 +1,10 @@
|
||||
#ifndef FX_IO_FILE_H_
|
||||
#define FX_IO_FILE_H_
|
||||
|
||||
#include <fx/core/error.h>
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/core/misc.h>
|
||||
#include <fx/core/stream.h>
|
||||
#include <fx/error.h>
|
||||
#include <fx/macros.h>
|
||||
#include <fx/misc.h>
|
||||
#include <fx/stream.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
@@ -54,25 +54,35 @@ typedef struct fx_file_info {
|
||||
FX_API fx_type fx_file_get_type(void);
|
||||
|
||||
FX_API fx_result fx_file_open(
|
||||
FX_TYPE_FWDREF(fx_directory) * root, const FX_TYPE_FWDREF(fx_path) * path,
|
||||
fx_file_mode mode, fx_file **out);
|
||||
FX_TYPE_FWDREF(fx_directory) * root,
|
||||
const FX_TYPE_FWDREF(fx_path) * path,
|
||||
fx_file_mode mode,
|
||||
fx_file **out);
|
||||
FX_API fx_result fx_file_open_temp(fx_file_mode mode, fx_file **out);
|
||||
FX_API fx_result fx_file_open_shadow(
|
||||
fx_file *original, fx_file_mode mode, fx_file **out);
|
||||
FX_API fx_result
|
||||
fx_file_open_shadow(fx_file *original, fx_file_mode mode, fx_file **out);
|
||||
|
||||
FX_API fx_status fx_file_stat(fx_file *file, fx_file_info *out);
|
||||
FX_API fx_status fx_file_size(fx_file *file, size_t *out_len);
|
||||
FX_API fx_status fx_file_cursor(fx_file *file, size_t *out_pos);
|
||||
FX_API fx_status fx_file_resize(fx_file *file, size_t len);
|
||||
FX_API fx_status fx_file_seek(fx_file *file, long long offset, fx_seek_basis basis);
|
||||
FX_API fx_status
|
||||
fx_file_seek(fx_file *file, long long offset, fx_seek_basis basis);
|
||||
FX_API const FX_TYPE_FWDREF(fx_path) * fx_file_path(const fx_file *file);
|
||||
|
||||
FX_API fx_status fx_file_swap_shadow(fx_file *main_file, fx_file *shadow_file);
|
||||
|
||||
FX_API fx_status fx_file_read(
|
||||
fx_file *file, size_t offset, size_t len, void *buf, size_t *nr_read);
|
||||
fx_file *file,
|
||||
size_t offset,
|
||||
size_t len,
|
||||
void *buf,
|
||||
size_t *nr_read);
|
||||
FX_API fx_status fx_file_write(
|
||||
fx_file *file, size_t offset, size_t len, const void *buf,
|
||||
fx_file *file,
|
||||
size_t offset,
|
||||
size_t len,
|
||||
const void *buf,
|
||||
size_t *nr_written);
|
||||
|
||||
FX_DECLS_END;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef FX_IO_PATH_H_
|
||||
#define FX_IO_PATH_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/core/misc.h>
|
||||
#include <fx/core/status.h>
|
||||
#include <fx/ds/string.h>
|
||||
#include <fx/macros.h>
|
||||
#include <fx/misc.h>
|
||||
#include <fx/status.h>
|
||||
#include <fx/string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
@@ -43,8 +43,11 @@ FX_API fx_status fx_path_stat(const fx_path *path, struct fx_file_info *out);
|
||||
FX_API fx_status fx_path_unlink(const fx_path *path);
|
||||
|
||||
FX_API enum fx_status fx_path_get_directory(
|
||||
const fx_path *path, fx_path **out_dir_path);
|
||||
FX_API enum fx_status fx_path_get_filename(const fx_path *path, fx_string *out_name);
|
||||
const fx_path *path,
|
||||
fx_path **out_dir_path);
|
||||
FX_API enum fx_status fx_path_get_filename(
|
||||
const fx_path *path,
|
||||
fx_string *out_name);
|
||||
|
||||
FX_API const char *fx_path_ptr(const fx_path *path);
|
||||
FX_API size_t fx_path_length(const fx_path *path);
|
||||
|
||||
Reference in New Issue
Block a user