00001 /*************** <auto-copyright.pl BEGIN do not edit this line> ************** 00002 * 00003 * VR Juggler is (C) Copyright 1998-2003 by Iowa State University 00004 * 00005 * Original Authors: 00006 * Allen Bierbaum, Christopher Just, 00007 * Patrick Hartling, Kevin Meinert, 00008 * Carolina Cruz-Neira, Albert Baker 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public 00021 * License along with this library; if not, write to the 00022 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00023 * Boston, MA 02111-1307, USA. 00024 * 00025 * ----------------------------------------------------------------- 00026 * File: $RCSfile: FileIO.h,v $ 00027 * Date modified: $Date: 2003/03/06 17:12:09 $ 00028 * Version: $Revision: 1.11 $ 00029 * ----------------------------------------------------------------- 00030 * 00031 *************** <auto-copyright.pl END do not edit this line> ***************/ 00032 00033 #ifndef _VRJ_FILE___IO_STUFF 00034 #define _VRJ_FILE___IO_STUFF 00035 00036 #include <vrj/vrjConfig.h> 00037 00038 #include <stdlib.h> 00039 #include <string> 00040 #include <vector> 00041 00042 00043 namespace vrj 00044 { 00045 00046 00047 class VJ_CLASS_API FileIO 00048 { 00049 public: 00050 // == "." by default 00051 // this is in the form of: 00052 // /home/users/me 00053 // or: ../../hi-man 00054 // or: ./rgbfiles 00055 // or: ${HOME}/VR/juggler 00056 // NOTE: you can use ${VARIABLE} in the path, to use env variables... 00057 static void addFilePath( const std::string& filepath = "." ); 00058 00067 static bool isAbsolutePathName( const std::string& n ); 00068 00075 static std::string demangleFileName( const std::string& n, std::string parentfile ); 00076 00078 static bool fileExists( const char* const name ); 00079 static bool fileExists( const std::string& name ); 00080 00085 static bool fileExistsResolvePath( const char* const filename, std::string& realPath ); 00086 static bool fileExistsResolvePath( const std::string& filename, std::string& realPath ); 00087 00091 static std::string resolvePathForName( const char* const filename ); 00092 00093 static std::vector<std::string> mPaths; 00094 }; 00095 00096 00097 }; 00098 00099 00100 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002