fixed some errors

This commit is contained in:
Odweta
2024-02-06 22:04:47 +01:00
parent e40b61a21b
commit f9e820efbc
10 changed files with 355 additions and 355 deletions
+9 -9
View File
@@ -13,28 +13,28 @@ typedef struct {
file_t *file_new(char *path); // initialization function
void file_cleanup(file_t *this); // just to be memory safe...
void file_cleanup(file_t *self); // just to be memory safe...
void file_print(file_t *this); // prints the file as a string
void file_print(file_t *self); // prints the file as a string
char *file_to_string(file_t *this); // returns a string with the file contents
char *file_to_string(file_t *self); // returns a string with the file contents
void file_writeln(file_t *this, char *payload); // appends a given string to the file on a newline
void file_writeln(file_t *self, char *payload); // appends a given string to the file on a newline
void file_write(file_t *this, char *payload); // appends a given string to the file (not on a newline!)
void file_write(file_t *self, char *payload); // appends a given string to the file (not on a newline!)
void file_copy(file_t* src, char *dst); // copy file src into file dst
void file_delete(file_t *this); // deletes a file
void file_delete(file_t *self); // deletes a file
void file_move(file_t* src, char *dst); // moves/renames a file
bool file_exists(file_t *this); // 1 = yes, 0 = no
bool_t file_exists(file_t *self); // TRUE = yes, FALSE = no
void file_create(char *path); // create an empty file with the given name
void file_number_lines(file_t *this); // prepend line numbers in front of each line in a file
void file_number_lines(file_t *self); // prepend line numbers in front of each line in a file
int file_count_words(file_t *this); // counts the number of words in a file
int file_count_words(file_t *self); // counts the number of words in a file
#endif // FILE_H