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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXPath.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                  P a t h   N a m e   M a n i p u l a t i o n                  *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2000,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXPATH_H
00022 #define FXPATH_H
00023 
00024 
00025 namespace FX {
00026 
00027 
00028 namespace FXPath {
00029 
00031   enum {
00032     PathName   = 1,        
00033     NoEscape   = 2,        
00034     DotFile    = 4,        
00035     LeadDir    = 8,        
00036     CaseFold   = 16        
00037     };
00038 
00044   extern FXAPI FXString root(const FXString& file);
00045 
00051   extern FXAPI FXString share(const FXString& file);
00052 
00058   extern FXAPI FXString directory(const FXString& file);
00059 
00065   extern FXAPI FXString name(const FXString& file);
00066 
00068   extern FXAPI FXString title(const FXString& file);
00069 
00071   extern FXAPI FXString extension(const FXString& file);
00072 
00074   extern FXAPI FXString stripExtension(const FXString& file);
00075 
00077   extern FXAPI FXString drive(const FXString& file);
00078 
00080   extern FXAPI FXString expand(const FXString& file);
00081 
00083   extern FXAPI FXString contract(const FXString& file,const FXString& user=FXString::null,const FXString& var=FXString::null);
00084 
00091   extern FXAPI FXString simplify(const FXString& file);
00092 
00094   extern FXAPI FXString absolute(const FXString& file);
00095 
00097   extern FXAPI FXString absolute(const FXString& base,const FXString& file);
00098 
00100   extern FXAPI FXString relative(const FXString& file);
00101 
00103   extern FXAPI FXString relative(const FXString& base,const FXString& file);
00104 
00106   extern FXAPI FXString convert(const FXString& file,FXchar septo=PATHSEP,FXchar sepfm='/');
00107 
00109   extern FXAPI FXString upLevel(const FXString& file);
00110 
00112   extern FXAPI FXbool isInside(const FXString& base,const FXString& file);
00113 
00115   extern FXAPI FXbool isAbsolute(const FXString& file);
00116 
00118   extern FXAPI FXbool isTopDirectory(const FXString& file);
00119 
00121   extern FXAPI FXbool isShare(const FXString& file);
00122 
00124   extern FXAPI FXbool isHidden(const FXString& file);
00125 
00127   extern FXAPI FXString enquote(const FXString& file,FXbool force=false);
00128 
00130   extern FXAPI FXString dequote(const FXString& file);
00131 
00159   extern FXAPI FXbool match(const FXchar *string,const FXchar *pattern="*",FXuint flags=(NoEscape|PathName));
00160 
00164   extern FXAPI FXbool match(const FXString& file,const FXchar *pattern="*",FXuint flags=(NoEscape|PathName));
00165 
00169   extern FXAPI FXbool match(const FXString& file,const FXString& pattern,FXuint flags=(NoEscape|PathName));
00170 
00176   extern FXAPI FXString unique(const FXString& file);
00177 
00181   extern FXAPI FXString search(const FXString& pathlist,const FXString& file);
00182 
00187   FXString relativize(const FXString& pathlist,const FXString& file);
00188   }
00189 
00190 }
00191 
00192 #endif

Copyright © 1997-2011 Jeroen van der Zijp