update: better handling of the keep files
This commit is contained in:
@ -49,7 +49,8 @@ typedef bool (*lm_ctx_serve_callback_t)(lm_pool_t *pool, lm_mptp_t *packet, stru
|
||||
typedef bool (*lm_ctx_ping_callback_t)(lm_ctx_t *ctx, lm_pool_t *pool, bool status, void *data);
|
||||
typedef bool (*lm_ctx_remove_callback_t)(
|
||||
lm_ctx_t *ctx, lm_entry_t *pkg, char *file, size_t current, size_t total, void *data);
|
||||
typedef lm_ctx_remove_callback_t lm_ctx_check_callback_t;
|
||||
typedef bool (*lm_ctx_check_callback_t)(
|
||||
lm_ctx_t *ctx, lm_entry_t *pkg, char *file, bool success, size_t current, size_t total, void *data);
|
||||
|
||||
/* ###############
|
||||
## ctx stuff ##
|
||||
@ -89,7 +90,7 @@ bool lm_ctx_serve(
|
||||
## temp directory fucntions ##
|
||||
############################## */
|
||||
char *lm_ctx_temp_dir(lm_ctx_t *ctx, char *dir);
|
||||
void lm_ctx_temp_clear(lm_ctx_t *ctx);
|
||||
bool lm_ctx_temp_clear(lm_ctx_t *ctx);
|
||||
|
||||
/* ####################
|
||||
## pool fucntions ##
|
||||
|
@ -142,6 +142,8 @@ typedef enum lm_error {
|
||||
LM_ERR_NotDir = 140,
|
||||
LM_ERR_NoWrite = 141,
|
||||
LM_ERR_PoolListBadDir = 142,
|
||||
LM_ERR_FileNotExist = 143,
|
||||
LM_ERR_FileNotLink = 144,
|
||||
} lm_error_t;
|
||||
|
||||
typedef struct lm_error_desc {
|
||||
|
@ -23,7 +23,7 @@ bool can_write(char *path);
|
||||
bool can_read(char *path);
|
||||
bool is_file(char *path);
|
||||
bool is_dir(char *path);
|
||||
bool exists(char *path);
|
||||
bool exists(char *path, struct stat *st);
|
||||
bool is_empty(char *p);
|
||||
bool is_dir_empty(char *p);
|
||||
bool rmrf(char *p);
|
||||
|
Reference in New Issue
Block a user