3 #include "system/angband.h"
7 /* Force definitions -- see fd_seek() */
18 /* Force definitions -- see fd_lock() */
30 extern void user_name(char *buf, int id);
32 extern int usleep(ulong usecs);
36 #define FILE_READ_BUFF_SIZE 65535
38 enum class FileOpenMode {
44 std::filesystem::path path_parse(const std::filesystem::path &path);
45 std::filesystem::path path_build(const std::filesystem::path &path, std::string_view file);
46 FILE *angband_fopen(const std::filesystem::path &path, const FileOpenMode mode, const bool is_binary = false);
47 FILE *angband_fopen_temp(char *buf, int max);
48 errr angband_fgets(FILE *fff, char *buf, ulong n);
49 errr angband_fputs(FILE *fff, concptr buf, ulong n);
50 errr angband_fclose(FILE *fff);
51 void fd_kill(const std::filesystem::path &path);
52 void fd_move(std::string_view from, std::string_view to);
53 int fd_make(const std::filesystem::path &path, bool can_write_group = false);
54 int fd_open(const std::filesystem::path &path, int mode);
55 errr fd_lock(int fd, int what);
56 errr fd_seek(int fd, ulong n);
57 errr fd_read(int fd, char *buf, ulong n);
58 errr fd_write(int fd, concptr buf, ulong n);
59 errr fd_close(int fd);