#ifndef __REMOVEFILE_H__
#define __REMOVEFILE_H__
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef uint32_t removefile_flags_t;
enum {
REMOVEFILE_RECURSIVE = (1 << 0), REMOVEFILE_KEEP_PARENT = (1 << 1), REMOVEFILE_SECURE_7_PASS = (1 << 2), REMOVEFILE_SECURE_35_PASS = (1 << 3), REMOVEFILE_SECURE_1_PASS = (1 << 4), };
typedef struct _removefile_state * removefile_state_t;
removefile_state_t removefile_state_alloc(void);
int removefile_state_free(removefile_state_t);
int removefile_state_get(removefile_state_t state, uint32_t key, void * dst);
int removefile_state_set(removefile_state_t state, uint32_t key, const void* value);
enum {
REMOVEFILE_STATE_CONFIRM_CALLBACK = 1, REMOVEFILE_STATE_CONFIRM_CONTEXT = 2, REMOVEFILE_STATE_ERROR_CALLBACK = 3, REMOVEFILE_STATE_ERROR_CONTEXT = 4, REMOVEFILE_STATE_ERRNO = 5, REMOVEFILE_STATE_STATUS_CALLBACK = 6, REMOVEFILE_STATE_STATUS_CONTEXT = 7, };
typedef int (*removefile_callback_t)(removefile_state_t state, const char* path, void* context);
enum {
REMOVEFILE_PROCEED = 0,
REMOVEFILE_SKIP = 1,
REMOVEFILE_STOP = 2,
};
int removefile(const char* path, removefile_state_t state, removefile_flags_t flags);
#ifdef __cplusplus
}
#endif
#endif