2024-03-09 20:18:19 +01:00
|
|
|
#ifndef FILE_H_
|
|
|
|
#define FILE_H_
|
|
|
|
|
|
|
|
typedef struct file {
|
2024-03-12 21:59:36 +01:00
|
|
|
char *path;
|
2024-03-11 22:54:14 +01:00
|
|
|
char *stats;
|
2024-03-13 11:18:35 +01:00
|
|
|
char *type;
|
2024-03-14 15:58:03 +01:00
|
|
|
int color;
|
2024-03-09 20:18:19 +01:00
|
|
|
struct file *next;
|
|
|
|
} file;
|
|
|
|
|
|
|
|
long files_len();
|
2024-03-13 11:18:35 +01:00
|
|
|
long marked_len();
|
2024-03-15 19:28:37 +01:00
|
|
|
void free_file(file *toremove);
|
2024-03-12 21:59:36 +01:00
|
|
|
void clear_files();
|
2024-03-13 11:18:35 +01:00
|
|
|
void clear_marked();
|
2024-03-14 15:58:03 +01:00
|
|
|
long add_file(char *filepath, char *stats, char *type, int color);
|
2024-03-15 19:28:37 +01:00
|
|
|
void remove_marked(file *marked_file);
|
2024-03-19 17:30:36 +01:00
|
|
|
long add_marked(char *filepath, char *type, bool force);
|
2024-03-15 19:28:37 +01:00
|
|
|
file *get_marked(long index);
|
|
|
|
bool in_marked(char *path);
|
2024-03-09 20:18:19 +01:00
|
|
|
file *get_file(long index);
|
2024-03-12 21:59:36 +01:00
|
|
|
char *get_filepath(long index);
|
2024-03-14 15:58:03 +01:00
|
|
|
int get_color(long index);
|
2024-03-11 22:54:14 +01:00
|
|
|
char *get_line(long index);
|
2024-03-09 20:18:19 +01:00
|
|
|
|
|
|
|
#endif
|