28 #ifndef AGS_ENGINE_AC_FILE_H 29 #define AGS_ENGINE_AC_FILE_H 31 #include "common/std/memory.h" 32 #include "ags/engine/ac/dynobj/script_file.h" 33 #include "ags/engine/ac/runtime_defines.h" 37 using AGS::Shared::Stream;
39 int File_Exists(
const char *fnmm);
40 int File_Delete(
const char *fnmm);
41 void *sc_OpenFile(
const char *fnmm,
int mode);
42 const char *File_ResolvePath(
const char *fnmm);
43 void File_Close(sc_File *fil);
44 void File_WriteString(sc_File *fil,
const char *towrite);
45 void File_WriteInt(sc_File *fil,
int towrite);
46 void File_WriteRawChar(sc_File *fil,
int towrite);
47 void File_WriteRawInt(sc_File *fil,
int towrite);
48 void File_WriteRawLine(sc_File *fil,
const char *towrite);
49 void File_ReadRawLine(sc_File *fil,
char *buffer);
50 const char *File_ReadRawLineBack(sc_File *fil);
51 void File_ReadString(sc_File *fil,
char *toread);
52 const char *File_ReadStringBack(sc_File *fil);
53 int File_ReadInt(sc_File *fil);
54 int File_ReadRawChar(sc_File *fil);
55 int File_ReadRawInt(sc_File *fil);
56 int File_Seek(sc_File *fil,
int offset,
int origin);
57 int File_GetEOF(sc_File *fil);
58 int File_GetError(sc_File *fil);
59 int File_GetPosition(sc_File *fil);
67 ScriptFileHandle *check_valid_file_handle_int32(int32_t handle,
const char *operation_name);
68 Stream *get_valid_file_stream_from_handle(int32_t handle,
const char *operation_name);