22#ifndef MADS_CORE_FILEIO_H
23#define MADS_CORE_FILEIO_H
25#include "common/stream.h"
29#define fread_bufsize 1024
31extern bool fileio_suppress_unbuffering;
34extern void fileio_purge_trailing_spaces(
char *myline);
37extern char *fileio_fix_lf_input(
char *mystring);
38extern void fileio_fix_lf_output(
char *mystring);
39extern int fileio_copy(
const char *source,
const char *dest);
42extern long fileio_fwrite_f(
const void *buffer,
long size,
long count,
Common::WriteStream *stream);
44extern long fileio_get_file_size(
const char *filename);
45extern bool fileio_exist(
const char *inp);
50extern char *fileio_get_filetype(
char *outp,
char *inp);
57extern long fileio_get_file_time(
char *filename);
63extern long fileio_get_disk_free(
char drive);
64extern void fileio_add_ext(
char *name,
const char *ext);
65extern void fileio_new_ext(
char *target,
const char *name,
const char *ext);
66extern int fileio_logpath(
const char *path);
67extern char *fileio_parse_filename(
char *target,
char *filepath);
68extern char *fileio_parse_path(
char *target,
const char *filepath);
69extern char *fileio_swap_path(
char *target,
const char *base,
const char *file);
70extern char *fileio_join_path(
char *target,
const char *path,
const char *file);
71extern void fileio_get_volume_label(
char *volume_label,
char drive_letter);
72extern int fileio_set_file_time(
char *filename,
long new_time);
73extern int fileio_get_file_attributes(
const char *filename, word *attributes);
74extern int fileio_set_file_attributes(
const char *filename, word attributes);
75extern int fileio_read_till_null(
char *target,
Common::Stream *handle);
76extern char *fileio_prepend(
char *target,
const char *source,
const char *prepend);
77extern char *fileio_chop_ext(
char *target,
const char *source);
78extern void fileio_purge_all_spaces(
char *text);