rpm  4.9.1.3
rpmfileutil.h
Go to the documentation of this file.
00001 #ifndef _RPMFILEUTIL_H
00002 #define _RPMFILEUTIL_H
00003 
00009 #include <rpm/rpmutil.h>
00010 #include <rpm/rpmio.h>
00011 #include <rpm/rpmpgp.h>
00012 #include <rpm/argv.h>
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00020 typedef enum rpmCompressedMagic_e {
00021     COMPRESSED_NOT              = 0,    
00022     COMPRESSED_OTHER            = 1,    
00023     COMPRESSED_BZIP2            = 2,    
00024     COMPRESSED_ZIP              = 3,    
00025     COMPRESSED_LZMA             = 4,    
00026     COMPRESSED_XZ               = 5,    
00027     COMPRESSED_LZIP             = 6,    
00028     COMPRESSED_LRZIP            = 7     
00029 } rpmCompressedMagic;
00030 
00040 int rpmDoDigest(int algo, const char * fn,int asAscii,
00041                   unsigned char * digest, rpm_loff_t * fsizep);
00042 
00048 FD_t rpmMkTemp(char *templ);
00049 
00060 FD_t rpmMkTempFile(const char * prefix, char **fn);
00061 
00070 int rpmioMkpath(const char * path, mode_t mode, uid_t uid, gid_t gid);
00071 
00080 int rpmMkdirs(const char *root, const char *pathstr);
00081 
00087 char * rpmCleanPath     (char * path);
00088 
00099 char * rpmGenPath       (const char * urlroot,
00100                         const char * urlmdir,
00101                         const char * urlfile);
00102 
00108 char * rpmGetPath (const char * path, ...) RPM_GNUC_NULL_TERMINATED;
00109 
00117 int rpmGlob(const char * patterns, int * argcPtr, ARGV_t * argvPtr);
00118 
00124 char * rpmEscapeSpaces(const char * s);
00125 
00132 int rpmFileIsCompressed (const char * file, rpmCompressedMagic * compressed);
00133 
00140 int rpmFileHasSuffix(const char *path, const char *suffix);
00141 
00146 char * rpmGetCwd(void);
00147 
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151 #endif /* _RPMFILEUTIL_H */