Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef _RAR_PATHFN_ |
2 | | #define _RAR_PATHFN_ |
3 | | |
4 | | wchar* PointToName(const wchar *Path); |
5 | | std::wstring PointToName(const std::wstring &Path); |
6 | | size_t GetNamePos(const std::wstring &Path); |
7 | | wchar* PointToLastChar(const wchar *Path); |
8 | | wchar GetLastChar(const std::wstring &Path); |
9 | | size_t ConvertPath(const std::wstring *SrcPath,std::wstring *DestPath); |
10 | | void SetName(std::wstring &FullName,const std::wstring &Name); |
11 | | void SetExt(std::wstring &Name,std::wstring NewExt); |
12 | | void RemoveExt(std::wstring &Name); |
13 | | void SetSFXExt(std::wstring &SFXName); |
14 | | wchar *GetExt(const wchar *Name); |
15 | | std::wstring GetExt(const std::wstring &Name); |
16 | | std::wstring::size_type GetExtPos(const std::wstring &Name); |
17 | | bool CmpExt(const std::wstring &Name,const std::wstring &Ext); |
18 | | bool IsWildcard(const std::wstring &Str); |
19 | | bool IsPathDiv(int Ch); |
20 | | bool IsDriveDiv(int Ch); |
21 | | bool IsDriveLetter(const std::wstring &Path); |
22 | | int GetPathDisk(const std::wstring &Path); |
23 | | void AddEndSlash(std::wstring &Path); |
24 | | void MakeName(const std::wstring &Path,const std::wstring &Name,std::wstring &Pathname); |
25 | | void GetPathWithSep(const std::wstring &FullName,std::wstring &Path); |
26 | | void RemoveNameFromPath(std::wstring &Path); |
27 | | #if defined(_WIN_ALL) && !defined(SFX_MODULE) |
28 | | bool GetAppDataPath(std::wstring &Path,bool Create); |
29 | | void GetRarDataPath(std::wstring &Path,bool Create); |
30 | | #endif |
31 | | #ifdef _WIN_ALL |
32 | | bool SHGetPathStrFromIDList(PCIDLIST_ABSOLUTE pidl,std::wstring &Path); |
33 | | #endif |
34 | | #ifndef SFX_MODULE |
35 | | bool EnumConfigPaths(uint Number,std::wstring &Path,bool Create); |
36 | | void GetConfigName(const std::wstring &Name,std::wstring &FullName,bool CheckExist,bool Create); |
37 | | #endif |
38 | | size_t GetVolNumPos(const std::wstring &ArcName); |
39 | | void NextVolumeName(std::wstring &ArcName,bool OldNumbering); |
40 | | bool IsNameUsable(const std::wstring &Name); |
41 | | void MakeNameUsable(std::wstring &Name,bool Extended); |
42 | | |
43 | | void UnixSlashToDos(const char *SrcName,char *DestName,size_t MaxLength); |
44 | | void UnixSlashToDos(const wchar *SrcName,wchar *DestName,size_t MaxLength); |
45 | | void UnixSlashToDos(const std::string &SrcName,std::string &DestName); |
46 | | void UnixSlashToDos(const std::wstring &SrcName,std::wstring &DestName); |
47 | | void DosSlashToUnix(const char *SrcName,char *DestName,size_t MaxLength); |
48 | | void DosSlashToUnix(const wchar *SrcName,wchar *DestName,size_t MaxLength); |
49 | | void DosSlashToUnix(const std::string &SrcName,std::string &DestName); |
50 | | void DosSlashToUnix(const std::wstring &SrcName,std::wstring &DestName); |
51 | | |
52 | | inline void SlashToNative(const char *SrcName,char *DestName,size_t MaxLength) |
53 | 0 | { |
54 | 0 | #ifdef _WIN_ALL |
55 | 0 | UnixSlashToDos(SrcName,DestName,MaxLength); |
56 | 0 | #else |
57 | 0 | DosSlashToUnix(SrcName,DestName,MaxLength); |
58 | 0 | #endif |
59 | 0 | } |
60 | | |
61 | | inline void SlashToNative(const std::string &SrcName,std::string &DestName) |
62 | 0 | { |
63 | 0 | #ifdef _WIN_ALL |
64 | 0 | UnixSlashToDos(SrcName,DestName); |
65 | 0 | #else |
66 | 0 | DosSlashToUnix(SrcName,DestName); |
67 | 0 | #endif |
68 | 0 | } |
69 | | |
70 | | inline void SlashToNative(const wchar *SrcName,wchar *DestName,size_t MaxLength) |
71 | 0 | { |
72 | 0 | #ifdef _WIN_ALL |
73 | 0 | UnixSlashToDos(SrcName,DestName,MaxLength); |
74 | 0 | #else |
75 | 0 | DosSlashToUnix(SrcName,DestName,MaxLength); |
76 | 0 | #endif |
77 | 0 | } |
78 | | |
79 | | inline void SlashToNative(const std::wstring &SrcName,std::wstring &DestName) |
80 | 210 | { |
81 | | #ifdef _WIN_ALL |
82 | | UnixSlashToDos(SrcName,DestName); |
83 | | #else |
84 | 210 | DosSlashToUnix(SrcName,DestName); |
85 | 210 | #endif |
86 | 210 | } |
87 | | |
88 | | void ConvertNameToFull(const std::wstring &Src,std::wstring &Dest); |
89 | | bool IsFullPath(const std::wstring &Path); |
90 | | bool IsFullRootPath(const std::wstring &Path); |
91 | | void GetPathRoot(const std::wstring &Path,std::wstring &Root); |
92 | | int ParseVersionFileName(std::wstring &Name,bool Truncate); |
93 | | size_t VolNameToFirstName(const std::wstring &VolName,std::wstring &FirstName,bool NewNumbering); |
94 | | |
95 | | #ifndef SFX_MODULE |
96 | | void GenerateArchiveName(std::wstring &ArcName,const std::wstring &GenerateMask,bool Archiving); |
97 | | #endif |
98 | | |
99 | | #ifdef _WIN_ALL |
100 | | bool GetWinLongPath(const std::wstring &Src,std::wstring &Dest); |
101 | | void ConvertToPrecomposed(std::wstring &Name); |
102 | | void MakeNameCompatible(std::wstring &Name); |
103 | | #endif |
104 | | |
105 | | |
106 | | #ifdef _WIN_ALL |
107 | | std::wstring GetModuleFileStr(); |
108 | | std::wstring GetProgramFile(const std::wstring &Name); |
109 | | #endif |
110 | | |
111 | | #if defined(_WIN_ALL) |
112 | | bool SetCurDir(const std::wstring &Dir); |
113 | | #endif |
114 | | |
115 | | #ifdef _WIN_ALL |
116 | | bool GetCurDir(std::wstring &Dir); |
117 | | #endif |
118 | | |
119 | | |
120 | | #endif |