rpm 4.15.1

rpmfileutil.h
Go to the documentation of this file.
1 #ifndef _RPMFILEUTIL_H
2 #define _RPMFILEUTIL_H
3
9 #include <rpm/rpmutil.h>
10 #include <rpm/rpmio.h>
11 #include <rpm/rpmpgp.h>
12 #include <rpm/argv.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
20 typedef enum rpmCompressedMagic_e {
21 COMPRESSED_NOT = 0,
22 COMPRESSED_OTHER = 1,
23 COMPRESSED_BZIP2 = 2,
24 COMPRESSED_ZIP = 3,
25 COMPRESSED_LZMA = 4,
26 COMPRESSED_XZ = 5,
27 COMPRESSED_LZIP = 6,
28 COMPRESSED_LRZIP = 7,
29 COMPRESSED_7ZIP = 8,
30 COMPRESSED_GEM = 9,
31 COMPRESSED_ZSTD = 10
32 } rpmCompressedMagic;
33
42 int rpmDoDigest(int algo, const char * fn,int asAscii, unsigned char * digest);
43
49 FD_t rpmMkTemp(char *templ);
50
61 FD_t rpmMkTempFile(const char * prefix, char **fn);
62
71 int rpmioMkpath(const char * path, mode_t mode, uid_t uid, gid_t gid);
72
81 int rpmMkdirs(const char *root, const char *pathstr);
82
88 char * rpmCleanPath (char * path);
89
100 char * rpmGenPath (const char * urlroot,
101 const char * urlmdir,
102 const char * urlfile);
103
109 char * rpmGetPath (const char * path, ...) RPM_GNUC_NULL_TERMINATED;
110
117 int rpmIsGlob(const char * pattern, int quote);
118
126 int rpmGlob(const char * patterns, int * argcPtr, ARGV_t * argvPtr);
127
133 char * rpmEscapeSpaces(const char * s);
134
141 int rpmFileIsCompressed (const char * file, rpmCompressedMagic * compressed);
142
149 int rpmFileHasSuffix(const char *path, const char *suffix);
150
155 char * rpmGetCwd(void);
156
157 #ifdef __cplusplus
158 }
159 #endif
160 #endif /* _RPMFILEUTIL_H */
rpmMkTemp
FD_t rpmMkTemp(char *templ)
rpmioMkpath
int rpmioMkpath(const char *path, mode_t mode, uid_t uid, gid_t gid)
rpmGetCwd
char * rpmGetCwd(void)
COMPRESSED_NOT
@ COMPRESSED_NOT
Definition: rpmfileutil.h:21
rpmFileIsCompressed
int rpmFileIsCompressed(const char *file, rpmCompressedMagic *compressed)
RPM_GNUC_NULL_TERMINATED
#define RPM_GNUC_NULL_TERMINATED
Definition: rpmutil.h:49
rpmGenPath
char * rpmGenPath(const char *urlroot, const char *urlmdir, const char *urlfile)
rpmFileHasSuffix
int rpmFileHasSuffix(const char *path, const char *suffix)
COMPRESSED_XZ
@ COMPRESSED_XZ
Definition: rpmfileutil.h:26
COMPRESSED_LZMA
@ COMPRESSED_LZMA
Definition: rpmfileutil.h:25
ARGV_t
char ** ARGV_t
Definition: argv.h:17
rpmGlob
int rpmGlob(const char *patterns, int *argcPtr, ARGV_t *argvPtr)
rpmCompressedMagic_e
rpmCompressedMagic_e
Definition: rpmfileutil.h:20
rpmCleanPath
char * rpmCleanPath(char *path)
COMPRESSED_ZIP
@ COMPRESSED_ZIP
Definition: rpmfileutil.h:24
rpmDoDigest
int rpmDoDigest(int algo, const char *fn, int asAscii, unsigned char *digest)
rpmEscapeSpaces
char * rpmEscapeSpaces(const char *s)
COMPRESSED_LRZIP
@ COMPRESSED_LRZIP
Definition: rpmfileutil.h:28
rpmGetPath
char * rpmGetPath(const char *path,...) RPM_GNUC_NULL_TERMINATED
rpmCompressedMagic
enum rpmCompressedMagic_e rpmCompressedMagic
COMPRESSED_BZIP2
@ COMPRESSED_BZIP2
Definition: rpmfileutil.h:23
COMPRESSED_GEM
@ COMPRESSED_GEM
Definition: rpmfileutil.h:30
rpmMkdirs
int rpmMkdirs(const char *root, const char *pathstr)
FD_t
struct _FD_s * FD_t
Definition: rpmtypes.h:98
COMPRESSED_ZSTD
@ COMPRESSED_ZSTD
Definition: rpmfileutil.h:31
COMPRESSED_LZIP
@ COMPRESSED_LZIP
Definition: rpmfileutil.h:27
COMPRESSED_7ZIP
@ COMPRESSED_7ZIP
Definition: rpmfileutil.h:29
rpmIsGlob
int rpmIsGlob(const char *pattern, int quote)
COMPRESSED_OTHER
@ COMPRESSED_OTHER
Definition: rpmfileutil.h:22
rpmMkTempFile
FD_t rpmMkTempFile(const char *prefix, char **fn)