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