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,2025 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 
117  extern FXAPI FXString expand(const FXString& file,FXint level=4);
118 
126  extern FXAPI FXString convert(const FXString& path);
127 
135  extern FXAPI FXString contract(const FXString& file,const FXString& user=FXString::null,const FXString& var=FXString::null);
136 
145  extern FXAPI FXString simplify(const FXString& file);
146 
148  extern FXAPI FXString absolute(const FXString& file);
149 
151  extern FXAPI FXString absolute(const FXString& base,const FXString& file);
152 
154  extern FXAPI FXString relative(const FXString& file);
155 
157  extern FXAPI FXString relative(const FXString& base,const FXString& file);
158 
160  extern FXAPI FXString upLevel(const FXString& file);
161 
163  extern FXAPI FXbool isInside(const FXString& base,const FXString& file);
164 
166  extern FXAPI FXbool isAbsolute(const FXString& file);
167 
169  extern FXAPI FXbool isRelative(const FXString& file);
170 
172  extern FXAPI FXbool isTopDirectory(const FXString& file);
173 
178  extern FXAPI FXbool isShare(const FXString& file);
179 
184  extern FXAPI FXbool isServer(const FXString& file);
185 
189  extern FXAPI FXbool isHidden(const FXString& file);
190 
195  extern FXAPI FXString validPath(const FXString& file);
196 
201  extern FXAPI FXbool isValidPath(const FXString& file);
202 
212  extern FXAPI FXString enquote(const FXString& file,FXbool force=false);
213 
218  extern FXAPI FXString dequote(const FXString& file);
219 
230  extern FXAPI FXint parseArgs(FXchar**& argv,const FXchar* command);
231 
236  extern FXAPI FXint parseArgs(FXchar**& argv,const FXString& command);
237 
265  extern FXAPI FXbool match(const FXchar* string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
266 
270  extern FXAPI FXbool match(const FXString& string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
271 
275  extern FXAPI FXbool match(const FXchar* string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
276 
280  extern FXAPI FXbool match(const FXString& string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
281 
287  extern FXAPI FXString unique(const FXString& file);
288 
293  extern FXAPI FXString search(const FXString& pathlist,const FXString& file);
294 
299  extern FXAPI FXString relativize(const FXString& pathlist,const FXString& file);
300 
305  extern FXAPI FXbool hasExecExtension(const FXString& file);
306 
310  extern FXAPI FXbool isReservedName(const FXString& file);
311 
312  }
313 
314 }
315 
316 #endif
Definition: FX4Splitter.h:28

Copyright © 1997-2022 Jeroen van der Zijp