forked from jonwil/snrtool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfileio.h
28 lines (28 loc) · 832 Bytes
/
fileio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include <stdio.h>
struct STDSTREAM
{
FILE* file;
int filepos;
int filesize;
int currentwritepos;
char* pointer;
char* pointer2;
int iswritable;
int needsflush;
int filemode;
char fname[1024];
char fname2[1024];
char buffer[8192];
};
STDSTREAM* gopen(const char* filename);
STDSTREAM* gwopen(char* filename);
int gclose(STDSTREAM* g);
int gread(STDSTREAM* g, void* buf, int size);
int gwrite(STDSTREAM* g, void* buf, int size);
int gseek(STDSTREAM* g, long long pos);
void getpath(const char* path, wchar_t* outpath, int pos);
int removefile(const char* fname);
int renamefile(const char* fname1, const char* fname2);
bool fileexists(const char* filename);
void buildfilename(char* s1, int size, const char* s2, const char* s3, const char* s4);