summaryrefslogtreecommitdiffstats
path: root/src/data.h
blob: 84b172f231c053509f889a5de7644764c2e83ad1 (plain) (blame)
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
#pragma once

#include "tag.h"

void data_load(void);
void data_save(void);
void data_free(void);

int get_fid(const char *path);
int track_fid_compare(struct link *a, struct link *b);
void index_update(struct tag *tag);
bool tracks_update(struct tag *tag);
void tracks_load(struct tag *tag);
void tracks_save(struct tag *tag);

bool make_dir(const char *path);
bool rm_dir(const char *path, bool recursive);
bool rm_file(const char *path);
bool copy_file(const char *dst, const char *src);
bool move_file(const char *dst, const char *src);

struct tag *tag_find(const char *query);

extern const char *datadir;

extern struct list tracks; /* struct ref */
extern struct list tags; /* struct tag */
extern struct list tags_sel; /* struct ref */