1 #ifndef FILES_H 2 #define FILES_H 3 4 #include <stdio.h> 5 #include "lists.h" 6 #include "playlist.h" 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 #define FILES_LIST_INIT_SIZE 64 13 14 void files_init (); 15 void files_cleanup (); 16 int read_directory (const char *directory, lists_t_strs *dirs, 17 lists_t_strs *playlists, struct plist *plist); 18 int read_directory_recurr (const char *directory, struct plist *plist); 19 void resolve_path (char *buf, const int size, const char *file); 20 char *ext_pos (const char *file); 21 enum file_type file_type (const char *file); 22 char *file_mime_type (const char *file); 23 int is_url (const char *str); 24 char *read_line (FILE *file); 25 char *find_match_dir (char *dir); 26 int file_exists (const char *file); 27 time_t get_mtime (const char *file); 28 struct file_tags *read_file_tags (const char *file, 29 struct file_tags *present_tags, const int tags_sel); 30 void switch_titles_file (struct plist *plist); 31 void switch_titles_tags (struct plist *plist); 32 void make_tags_title (struct plist *plist, const int num); 33 void make_file_title (struct plist *plist, const int num, 34 const int hide_extension); 35 int is_dir (const char *file); 36 int can_read_file (const char *file); 37 char *absolute_path (const char *path, const char *cwd); 38 bool is_secure (const char *file); 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif 45