|
@@ -7,6 +7,8 @@
|
|
|
#ifndef _EGG_MISC_FILE_H
|
|
#ifndef _EGG_MISC_FILE_H
|
|
|
#define _EGG_MISC_FILE_H
|
|
#define _EGG_MISC_FILE_H
|
|
|
|
|
|
|
|
|
|
+#include <stdio.h>
|
|
|
|
|
+
|
|
|
int copyfile(const char *, const char *);
|
|
int copyfile(const char *, const char *);
|
|
|
int movefile(const char *, const char *);
|
|
int movefile(const char *, const char *);
|
|
|
int is_file(const char *);
|
|
int is_file(const char *);
|
|
@@ -16,4 +18,18 @@ int is_symlink(const char *);
|
|
|
int is_dir(const char *);
|
|
int is_dir(const char *);
|
|
|
int fixmod(const char *);
|
|
int fixmod(const char *);
|
|
|
|
|
|
|
|
|
|
+class Tempfile
|
|
|
|
|
+{
|
|
|
|
|
+ public:
|
|
|
|
|
+ Tempfile(); //constructor
|
|
|
|
|
+ Tempfile(const char *prefix); //constructor with file prefix
|
|
|
|
|
+ ~Tempfile(); //destructor
|
|
|
|
|
+
|
|
|
|
|
+ FILE *f;
|
|
|
|
|
+ int fd;
|
|
|
|
|
+ char *file;
|
|
|
|
|
+ private:
|
|
|
|
|
+ void MakeTemp(); //Used for mktemp() and checking
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
#endif /* _EGG_MISC_FILE_H */
|
|
#endif /* _EGG_MISC_FILE_H */
|