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,2026 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 
43  extern FXAPI FXString root(const FXString& file);
44 
51  extern FXAPI FXString share(const FXString& file);
52 
59  extern FXAPI FXString server(const FXString& file);
60 
65  extern FXAPI FXString drive(const FXString& file);
66 
75  extern FXAPI FXString directory(const FXString& file);
76 
82  extern FXAPI FXString name(const FXString& file);
83 
90  extern FXAPI FXString stem(const FXString& file);
91 
101  extern FXAPI FXString extension(const FXString& file);
102 
106  extern FXAPI FXString stripExtension(const FXString& file);
107 
116  extern FXAPI FXString expand(const FXString& file,FXint level=4);
117 
129  extern FXAPI FXString convertToWindows(const FXString& path);
130 
142  extern FXAPI FXString convertFromWindows(const FXString& path);
143 
148  extern FXAPI FXString convert(const FXString& path);
149 
155  extern FXAPI FXString convertPathList(const FXString& path);
156 
164  extern FXAPI FXString contract(const FXString& file,const FXString& user=FXString::null,const FXString& var=FXString::null);
165 
174  extern FXAPI FXString simplify(const FXString& file);
175 
177  extern FXAPI FXString absolute(const FXString& file);
178 
180  extern FXAPI FXString absolute(const FXString& base,const FXString& file);
181 
183  extern FXAPI FXString relative(const FXString& file);
184 
186  extern FXAPI FXString relative(const FXString& base,const FXString& file);
187 
189  extern FXAPI FXString upLevel(const FXString& file);
190 
192  extern FXAPI FXbool isInside(const FXString& base,const FXString& file);
193 
195  extern FXAPI FXbool isAbsolute(const FXString& file);
196 
198  extern FXAPI FXbool isRelative(const FXString& file);
199 
201  extern FXAPI FXbool isTopDirectory(const FXString& file);
202 
207  extern FXAPI FXbool isShare(const FXString& file);
208 
213  extern FXAPI FXbool isServer(const FXString& file);
214 
218  extern FXAPI FXbool isHidden(const FXString& file);
219 
224  extern FXAPI FXString validPath(const FXString& file);
225 
230  extern FXAPI FXbool isValidPath(const FXString& file);
231 
241  extern FXAPI FXString enquote(const FXString& file,FXbool force=false);
242 
247  extern FXAPI FXString dequote(const FXString& file);
248 
259  extern FXAPI FXint parseArgs(FXchar**& argv,const FXchar* command);
260 
265  extern FXAPI FXint parseArgs(FXchar**& argv,const FXString& command);
266 
294  extern FXAPI FXbool match(const FXchar* string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
295 
299  extern FXAPI FXbool match(const FXString& string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
300 
304  extern FXAPI FXbool match(const FXchar* string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
305 
309  extern FXAPI FXbool match(const FXString& string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
310 
316  extern FXAPI FXString unique(const FXString& file);
317 
322  extern FXAPI FXString search(const FXString& list,const FXString& file);
323 
328  extern FXAPI FXString relativize(const FXString& list,const FXString& file);
329 
334  extern FXAPI FXbool hasExecExtension(const FXString& file);
335 
339  extern FXAPI FXbool isReservedName(const FXString& file);
340 
341  }
342 
343 }
344 
345 #endif
Definition: FX4Splitter.h:28

Copyright © 1997-2026 Jeroen van der Zijp