00001 00007 #ifndef INC_FILE_H 00008 #define INC_FILE_H 00009 00010 #include <stdio.h> 00011 #include <stdbool.h> 00012 #include <stdlib.h> 00013 00015 extern char file_common_buffer[10240]; 00016 00022 off_t file_filesize(const char *filename); 00023 00029 off_t file_filesize_f(FILE *f); 00030 00038 void file_path_explode(char *path, char **dir, char **file, char **ext); 00039 00045 bool file_set_context(const char *device); 00046 00052 bool file_exists(const char *path); 00053 00059 const char *file_remove_headslash(const char *path); 00060 00066 const char *file_get_extension(const char *path); 00067 00072 void file_windows_slashes(char *path); 00073 00081 FILE *file_fcaseopen(const char *directory, const char *filename, const char *mode); 00082 00089 bool file_truncate(FILE *f, const off_t len); 00090 00091 #endif