38 #define FF_STRINGIFY(s) #s
39 #define FF_TOSTRING(s) FF_STRINGIFY(s)
41 #define FF_VERSION_INT(a, b, c) (a << 16 | b << 8 | c)
42 #define FF_VERSION_DOT(a, b, c) a ##.## b ##.## c
43 #define FF_VERSION(a, b, c) FF_VERSION_DOT(a, b, c)
45 #define LIBFOSFAT_VERSION_MAJOR 1
46 #define LIBFOSFAT_VERSION_MINOR 0
47 #define LIBFOSFAT_VERSION_MICRO 0
49 #define LIBFOSFAT_VERSION_INT FF_VERSION_INT(LIBFOSFAT_VERSION_MAJOR, \
50 LIBFOSFAT_VERSION_MINOR, \
51 LIBFOSFAT_VERSION_MICRO)
52 #define LIBFOSFAT_VERSION FF_VERSION(LIBFOSFAT_VERSION_MAJOR, \
53 LIBFOSFAT_VERSION_MINOR, \
54 LIBFOSFAT_VERSION_MICRO)
55 #define LIBFOSFAT_VERSION_STR FF_TOSTRING(LIBFOSFAT_VERSION)
56 #define LIBFOSFAT_BUILD LIBFOSFAT_VERSION_INT
60 #define FOSFAT_NAMELGT 17
62 #define F_UNDELETE (1 << 0)
65 typedef enum disk_type {
73 typedef struct time_s {
83 typedef struct att_s {
92 typedef struct file_info_s {
93 char name[FOSFAT_NAMELGT];
100 struct file_info_s *next_file;
277 const char *src,
const char *dst,
int output);
293 const char *path,
int offset,
int size);
int fosfat_isdir(fosfat_t *fosfat, const char *location)
Get boolean information on a specific file or folder.
void fosfat_close(fosfat_t *fosfat)
Free the memory and close the device properly.
fosfat_file_t * fosfat_get_stat(fosfat_t *fosfat, const char *location)
Get some informations on a file or a directory.
fosfat_disk_t fosfat_type(fosfat_t *fosfat)
Get the disk type.
uint8_t * fosfat_get_buffer(fosfat_t *fosfat, const char *path, int offset, int size)
Get a buffer of a file.
fosfat_file_t * fosfat_list_dir(fosfat_t *fosfat, const char *location)
Get file/dir list of a directory in a linked list.
int fosfat_islink(fosfat_t *fosfat, const char *location)
Get boolean information on a specific file or folder.
int fosfat_isvisible(fosfat_t *fosfat, const char *location)
Get boolean information on a specific file or folder.
char * fosfat_symlink(fosfat_t *fosfat, const char *location)
Get the target of a soft-link.
int fosfat_get_file(fosfat_t *fosfat, const char *src, const char *dst, int output)
Get a file from a location and put this on the user hard drive.
char * fosfat_diskname(fosfat_t *fosfat)
Get the disk's name of a specific device.
void fosfat_free_listdir(fosfat_file_t *var)
Free the memory for an linked list created by fosfat_list_dir().
int fosfat_isencoded(fosfat_t *fosfat, const char *location)
Get boolean information on a specific file or folder.
void fosfat_logger(int state)
Change log level (verbosity).
int fosfat_isopenexm(fosfat_t *fosfat, const char *location)
Get boolean information on a specific file or folder.
fosfat_t * fosfat_open(const char *dev, fosfat_disk_t disk, unsigned int flag)
Load a device compatible Smaky FOS.