]>
Commit | Line | Data |
---|---|---|
48397721 CF |
1 | /* |
2 | * Copyright (c) 2000, Red Hat, Inc. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * A copy of the GNU General Public License can be found at | |
10 | * http://www.gnu.org/ | |
11 | * | |
12 | * Written by Christopher Faylor <cgf@cygnus.com> | |
13 | * | |
14 | */ | |
15 | ||
12e726c4 MB |
16 | #ifndef SETUP_FILEMANIP_H |
17 | #define SETUP_FILEMANIP_H | |
18 | ||
af67048a | 19 | #include <sys/types.h> |
3a8630fd | 20 | #include <string> |
3c054baf | 21 | |
48397721 | 22 | extern int find_tar_ext (const char *path); |
85b43844 | 23 | |
3a8630fd | 24 | struct fileparse |
85b43844 | 25 | { |
08678720 MB |
26 | std::string pkg; |
27 | std::string ver; | |
28 | std::string tail; | |
29 | std::string what; | |
3a8630fd | 30 | }; |
85b43844 | 31 | |
08678720 | 32 | int parse_filename (const std::string& fn, fileparse & f); |
08678720 | 33 | size_t get_file_size (const std::string& ); |
2b791966 | 34 | std::string backslash (const std::string& s); |
0d4e0aad | 35 | const char * trail (const char *, const char *); |
2f0315ad | 36 | int mklongpath (wchar_t *tgt, const char *src, size_t len); |
c0aead38 | 37 | int mklongrelpath (wchar_t *tgt, const char *src, size_t len); |
6dcfeb7d | 38 | FILE *nt_wfopen (const wchar_t *wpath, const char *mode, mode_t perms); |
4d0b3b8c | 39 | FILE *nt_fopen (const char *path, const char *mode, mode_t perms = 0644); |
12e726c4 MB |
40 | |
41 | #endif /* SETUP_FILEMANIP_H */ |