made work: copy a file, move a file, check if a file exists, delete a file
This commit is contained in:
+15
-5
@@ -12,14 +12,24 @@ typedef struct {
|
||||
|
||||
file_t* fileInit(char* path); // initialization function
|
||||
|
||||
void fileCleanup(file_t* f); // just to be memory safe...
|
||||
void fileCleanup(file_t* f); // just to be memory safe...
|
||||
|
||||
void filePrint(file_t* f); // prints the file as a string
|
||||
void filePrint(file_t* f); // prints the file as a string
|
||||
|
||||
char* fileToString(file_t* f); // returns a string with the file contents
|
||||
char* fileToString(file_t* f); // returns a string with the file contents
|
||||
|
||||
void fileWriteln(file_t* f, char* payload); // appends a given string to the file on a newline
|
||||
void fileWriteln(file_t* f, char* payload); // appends a given string to the file on a newline
|
||||
|
||||
void fileWrite(file_t* f, char* payload); // appends a given string to the file (not on a newline!)
|
||||
void fileWrite(file_t* f, char* payload); // appends a given string to the file (not on a newline!)
|
||||
|
||||
void fileCopy(file_t* src, char* dst); // copy file src into file dst
|
||||
|
||||
void fileDelete(file_t* f); // deletes a file
|
||||
|
||||
void fileMove(file_t* src, char* dst); // moves/renames a file
|
||||
|
||||
int fileExists(file_t* f); // 1 = yes, 0 = no
|
||||
|
||||
void fileCreateEmpty(char* path); // create an empty file with the given name
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user