-
Notifications
You must be signed in to change notification settings - Fork 38
/
files.h
44 lines (38 loc) · 1.26 KB
/
files.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef FILES_H
#define FILES_H
#include <stdio.h>
#include "lists.h"
#include "playlist.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FILES_LIST_INIT_SIZE 64
void files_init ();
void files_cleanup ();
int read_directory (const char *directory, lists_t_strs *dirs,
lists_t_strs *playlists, struct plist *plist);
int read_directory_recurr (const char *directory, struct plist *plist);
void resolve_path (char *buf, size_t size, const char *file);
char *ext_pos (const char *file);
enum file_type file_type (const char *file);
char *file_mime_type (const char *file);
int is_url (const char *str);
char *read_line (FILE *file);
char *find_match_dir (char *dir);
int file_exists (const char *file);
time_t get_mtime (const char *file);
struct file_tags *read_file_tags (const char *file,
struct file_tags *present_tags, const int tags_sel);
void switch_titles_file (struct plist *plist);
void switch_titles_tags (struct plist *plist);
void make_tags_title (struct plist *plist, const int num);
void make_file_title (struct plist *plist, const int num,
const bool hide_extension);
int is_dir (const char *file);
int can_read_file (const char *file);
char *absolute_path (const char *path, const char *cwd);
bool is_secure (const char *file);
#ifdef __cplusplus
}
#endif
#endif