diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2024-01-23 09:22:00 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-02-08 09:27:54 +0100 |
commit | 42f538cc66546997a166dbe67e489c9afabbb908 (patch) | |
tree | 718bb6b7161892c4b964499c1818c6d7bf0bd6a6 /file.h | |
parent | 760031b4a74d70bdeaab4ce9aedfe772acd05bd3 (diff) |
download files
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -35,23 +35,19 @@ #include <stdbool.h> -enum file_type { - AUDIO, - VIDEO, - TEXT, - OTHER -}; +#include "mime.h" /* * a file */ struct file { - char *path; /* relative to DATA_DIR */ - char *name; - char *action_url; /* action URL for HTML page */ - bool is_dir; - enum file_type type; SLIST_ENTRY(file) files; + size_t size; + enum mime mime; + char *path; /* relative to DATA_DIR */ + char *name; + char *action_url; /* action URL for HTML page */ + bool is_dir; }; /* @@ -65,6 +61,6 @@ file_free(struct file *); * Build a new file */ struct file * -file_new(char *dir, size_t dir_len, char *name, size_t name_len); +file_new(char *, size_t, char *, size_t); #endif /* FILE_H */ |