43 #include <sys/types.h>
49 #define FOSSREPO_CONF "/srv/fossology/repository"
52 #define FOSSGROUP "fossology"
FOSSology library to read config file.
FILE * fo_RepFwrite(char *Type, char *Filename)
Perform an fwrite. Also creates directories.
char * fo_RepMkPath(const char *Type, char *Filename)
Given a filename, construct the full path to the file.
int fo_RepOpenFull(fo_conf *config)
Loads common information from configuration files into ram.
int fo_RepExist2(char *Type, char *Filename)
Determine if a file exists.
int fo_RepImport(char *Source, char *Type, char *Filename, int Link)
Import a file into the repository.
int fo_RepFclose(FILE *F)
Perform an fclose.
char * fo_RepGetRepPath()
Determine the path for the repository's root.
FILE * fo_RepFread(char *Type, char *Filename)
Perform an fopen for reading only.
char * fo_RepValidate(fo_conf *config)
validates the repository configuration information.
int fo_RepOpen()
wrapper function for agents. Simply call fo_RepOpenFull() passing in the default system configuration
int fo_RepHostExist(char *Type, char *Host)
Determine if a host exists.
RepMmapStruct * fo_RepMmap(char *Type, char *Filename)
Perform a mmap.
int fo_RepExist(char *Type, char *Filename)
Determine if a file exists.
char * fo_RepGetHost(char *Type, char *Filename)
Determine the host for a filename.
int fo_RepRemove(char *Type, char *Filename)
Delete a repository file.
void fo_RepClose()
Close and unmap the repository configuration file.
void fo_RepMunmap(RepMmapStruct *M)
Perform a munmap.
RepMmapStruct * fo_RepMmapFile(char *Fname)
Perform a mmap on a regular file name.
int _RepMkDirs(char *Fname)
Same as command-line "mkdir -p".
unsigned char * Mmap
Memory pointer from mmap.
int FileHandle
Handle from open()
uint32_t MmapSize
Size of file mmap.
uint32_t _MmapSize
Real size of mmap (set to page boundary)