Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXPath.h
1 /********************************************************************************
2 * *
3 * P a t h N a m e M a n i p u l a t i o n *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2000,2024 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXPATH_H
22 #define FXPATH_H
23 
24 namespace FX {
25 
26 namespace FXPath {
27 
29  enum {
30  PathName = 1,
31  NoEscape = 2,
32  DotFile = 4,
33  LeadDir = 8,
34  CaseFold = 16
35  };
36 
42  extern FXAPI FXString root(const FXString& file);
43 
49  extern FXAPI FXString share(const FXString& file);
50 
56  extern FXAPI FXString directory(const FXString& file);
57 
63  extern FXAPI FXString name(const FXString& file);
64 
71  extern FXAPI FXString stem(const FXString& file);
72 
81  extern FXAPI FXString extension(const FXString& file);
82 
86  extern FXAPI FXString stripExtension(const FXString& file);
87 
91  extern FXAPI FXString drive(const FXString& file);
92 
100  extern FXAPI FXString expand(const FXString& file,FXint level=4);
101 
106  extern FXAPI FXString convert(const FXString& path);
107 
109  extern FXAPI FXString contract(const FXString& file,const FXString& user=FXString::null,const FXString& var=FXString::null);
110 
118  extern FXAPI FXString simplify(const FXString& file);
119 
121  extern FXAPI FXString absolute(const FXString& file);
122 
124  extern FXAPI FXString absolute(const FXString& base,const FXString& file);
125 
127  extern FXAPI FXString relative(const FXString& file);
128 
130  extern FXAPI FXString relative(const FXString& base,const FXString& file);
131 
133  extern FXAPI FXString upLevel(const FXString& file);
134 
136  extern FXAPI FXbool isInside(const FXString& base,const FXString& file);
137 
139  extern FXAPI FXbool isAbsolute(const FXString& file);
140 
142  extern FXAPI FXbool isRelative(const FXString& file);
143 
145  extern FXAPI FXbool isTopDirectory(const FXString& file);
146 
148  extern FXAPI FXbool isShare(const FXString& file);
149 
151  extern FXAPI FXbool isHidden(const FXString& file);
152 
154  extern FXAPI FXString validPath(const FXString& file);
155 
157  extern FXAPI FXbool isValidPath(const FXString& file);
158 
160  extern FXAPI FXString enquote(const FXString& file,FXbool force=false);
161 
163  extern FXAPI FXString dequote(const FXString& file);
164 
175  extern FXAPI FXint parseArgs(FXchar**& argv,const FXchar* command);
176 
181  extern FXAPI FXint parseArgs(FXchar**& argv,const FXString& command);
182 
210  extern FXAPI FXbool match(const FXchar* string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
211 
215  extern FXAPI FXbool match(const FXString& string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
216 
220  extern FXAPI FXbool match(const FXchar* string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
221 
225  extern FXAPI FXbool match(const FXString& string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
226 
232  extern FXAPI FXString unique(const FXString& file);
233 
238  extern FXAPI FXString search(const FXString& pathlist,const FXString& file);
239 
244  extern FXAPI FXString relativize(const FXString& pathlist,const FXString& file);
245 
250  extern FXAPI FXbool hasExecExtension(const FXString& file);
251 
255  extern FXAPI FXbool isReservedName(const FXString& file);
256 
257  }
258 
259 }
260 
261 #endif
Definition: FX4Splitter.h:28

Copyright © 1997-2022 Jeroen van der Zijp