ccc/file.h

27 lines
614 B
C
Raw Normal View History

#ifndef FILE_H_
#define FILE_H_
2024-03-20 21:29:04 +01:00
#include <stdio.h>
typedef struct file {
char *path;
2024-03-11 22:54:14 +01:00
char *stats;
char *type;
int color;
} file;
2024-03-20 21:29:04 +01:00
typedef struct ArrayList {
size_t length;
size_t capacity;
file *items;
} ArrayList;
ArrayList *arraylist_init(size_t capacity);
void arraylist_free(ArrayList *list);
bool arraylist_includes(ArrayList *list, char *path);
void arraylist_remove(ArrayList *list, long index);
void arraylist_add(ArrayList *list, char *filepath, char *stats, char *type, int color, bool marked, bool force);
char *get_line(ArrayList *list, long index, bool detail);
#endif