#ifndef SWIFT_FS_FILESYSTEM_H
#define SWIFT_FS_FILESYSTEM_H

#include <swift/stdlib.h>
#include <swift/time.h>

#include <swift/fs/api.h>

typedef struct swift_dir_t swift_dir_t;

SWIFT_FS_API bool swift_init_fs(void);
SWIFT_FS_API void swift_term_fs(void);

SWIFT_FS_API bool swift_check_path(const char *path);
SWIFT_FS_API bool swift_is_file(const char *path);
SWIFT_FS_API bool swift_is_dir(const char *path);
SWIFT_FS_API bool swift_is_symlink(const char *path);

SWIFT_FS_API bool swift_get_atime(const char *path, swift_time_t *time);
SWIFT_FS_API bool swift_get_ctime(const char *path, swift_time_t *time);
SWIFT_FS_API bool swift_get_mtime(const char *path, swift_time_t *time);

SWIFT_FS_API uint64_t swift_get_file_size(const char *path);

SWIFT_FS_API bool swift_new_dir(const char *path);
SWIFT_FS_API bool swift_del_dir(const char *path);
SWIFT_FS_API bool swift_new_dir_r(const char *path);
SWIFT_FS_API bool swift_del_dir_r(const char *path);
SWIFT_FS_API swift_dir_t *swift_open_dir(const char *path);
SWIFT_FS_API const char *swift_read_dir(swift_dir_t *dir);
SWIFT_FS_API void swift_close_dir(swift_dir_t *dir);

SWIFT_FS_API bool swift_move_file(const char *dst_path, const char *src_path);
SWIFT_FS_API bool swift_del_file(const char *path);

#endif
