ccc/file.h

29 lines
737 B
C
Raw Permalink Normal View History

#ifndef FILE_H_
#define FILE_H_
2024-03-20 21:29:04 +01:00
#include <stdio.h>
typedef struct file {
char *name; /* basename */
char *path; /* absolute path */
char *type;
char *stats;
wchar_t *icon;
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);
long arraylist_search(ArrayList *list, char *filepath, bool bname);
2024-03-20 21:29:04 +01:00
void arraylist_remove(ArrayList *list, long index);
void arraylist_add(ArrayList *list, char *filename, char *path, char *stats, char *type, wchar_t *icon, int color, bool marked, bool force);
2024-04-02 02:18:34 +02:00
char *get_line(ArrayList *list, long index, bool detail, bool icons);
#endif