24 #include <yaz/yconfig.h>
32 #define mfile_seek _lseeki64
35 #include <sys/types.h>
37 #define mfile_seek lseek
41 #include <sys/param.h>
42 #define FILENAME_MAX MAXPATHLEN
49 #define MF_MIN_BLOCKS_CREAT 1
50 #define MF_MAX_PARTS 28
52 #define mf_blocksize(mf) ((mf)->blocksize)
110 int only_shadow_files)
180 double *bytes_used,
double *bytes_max);
int mf_read(MFile mf, zint no, int offset, int nbytes, void *buf) ZEBRA_GCC_ATTR((warn_unused_result))
reads block from metafile
struct meta_file meta_file
void mf_reset(MFile_area ma, int unlink_flag)
reset all files in a metafile area (optionally delete them as well)
int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf) ZEBRA_GCC_ATTR((warn_unused_result))
writes block to metafile
MFile_area mf_init(const char *name, const char *spec, const char *base, int only_shadow_files) ZEBRA_GCC_ATTR((warn_unused_result))
creates a metafile area
struct MFile_area_struct * MFile_area
void mf_destroy(MFile_area ma)
destroys metafile area handle
int mf_area_directory_stat(MFile_area ma, int no, const char **directory, double *bytes_used, double *bytes_max)
metafile area statistics
MFile mf_open(MFile_area ma, const char *name, int block_size, int wflag) ZEBRA_GCC_ATTR((warn_unused_result))
opens metafile
struct part_file part_file
int mf_close(MFile mf)
closes metafile
struct meta_file * mfiles
struct MFile_area_struct * next
char name[FILENAME_MAX+1]
char name[FILENAME_MAX+1]
#define ZEBRA_GCC_ATTR(x)