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,2022 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 
68  extern FXAPI FXString stem(const FXString& file);
69 
77  extern FXAPI FXString extension(const FXString& file);
78 
82  extern FXAPI FXString stripExtension(const FXString& file);
83 
87  extern FXAPI FXString drive(const FXString& file);
88 
96  extern FXAPI FXString expand(const FXString& file,FXint level=4);
97 
102  extern FXAPI FXString convert(const FXString& path);
103 
105  extern FXAPI FXString contract(const FXString& file,const FXString& user=FXString::null,const FXString& var=FXString::null);
106 
114  extern FXAPI FXString simplify(const FXString& file);
115 
117  extern FXAPI FXString absolute(const FXString& file);
118 
120  extern FXAPI FXString absolute(const FXString& base,const FXString& file);
121 
123  extern FXAPI FXString relative(const FXString& file);
124 
126  extern FXAPI FXString relative(const FXString& base,const FXString& file);
127 
129  extern FXAPI FXString upLevel(const FXString& file);
130 
132  extern FXAPI FXbool isInside(const FXString& base,const FXString& file);
133 
135  extern FXAPI FXbool isAbsolute(const FXString& file);
136 
138  extern FXAPI FXbool isRelative(const FXString& file);
139 
141  extern FXAPI FXbool isTopDirectory(const FXString& file);
142 
144  extern FXAPI FXbool isShare(const FXString& file);
145 
147  extern FXAPI FXbool isHidden(const FXString& file);
148 
150  extern FXAPI FXString validPath(const FXString& file);
151 
153  extern FXAPI FXbool isValidPath(const FXString& file);
154 
156  extern FXAPI FXString enquote(const FXString& file,FXbool force=false);
157 
159  extern FXAPI FXString dequote(const FXString& file);
160 
171  extern FXAPI FXint parseArgs(FXchar**& argv,const FXchar* command);
172 
177  extern FXAPI FXint parseArgs(FXchar**& argv,const FXString& command);
178 
206  extern FXAPI FXbool match(const FXchar* string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
207 
211  extern FXAPI FXbool match(const FXString& string,const FXchar* pattern="*",FXuint flags=(NoEscape|PathName));
212 
216  extern FXAPI FXbool match(const FXchar* string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
217 
221  extern FXAPI FXbool match(const FXString& string,const FXString& pattern,FXuint flags=(NoEscape|PathName));
222 
228  extern FXAPI FXString unique(const FXString& file);
229 
234  extern FXAPI FXString search(const FXString& pathlist,const FXString& file);
235 
240  extern FXAPI FXString relativize(const FXString& pathlist,const FXString& file);
241 
246  extern FXAPI FXbool hasExecExtension(const FXString& file);
247 
251  extern FXAPI FXbool isReservedName(const FXString& file);
252 
253  }
254 
255 }
256 
257 #endif
Definition: FX4Splitter.h:28

Copyright © 1997-2022 Jeroen van der Zijp