*
*/
+#ifndef SETUP_FILEMANIP_H
+#define SETUP_FILEMANIP_H
+
+#include <sys/types.h>
+#include <string>
+
extern int find_tar_ext (const char *path);
+
+struct fileparse
+{
+ std::string pkg;
+ std::string ver;
+ std::string tail;
+ std::string what;
+};
+
+int parse_filename (const std::string& fn, fileparse & f);
+size_t get_file_size (const std::string& );
+std::string backslash (const std::string& s);
+const char * trail (const char *, const char *);
+int mklongpath (wchar_t *tgt, const char *src, size_t len);
+int mklongrelpath (wchar_t *tgt, const char *src, size_t len);
+FILE *nt_wfopen (const wchar_t *wpath, const char *mode, mode_t perms);
+FILE *nt_fopen (const char *path, const char *mode, mode_t perms = 0644);
+
+#endif /* SETUP_FILEMANIP_H */