Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Path.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 
00012 
00013 //
00014 // Path.hpp
00015 //
00016 // 20 May 2004 -- tds
00017 //
00018 
00019 
00020 #ifndef INDRI_PATH_HPP
00021 #define INDRI_PATH_HPP
00022 
00023 #include <string>
00024 namespace indri
00025 {
00026   namespace file
00027   {
00028     
00029     class Path {
00030     public:
00031       static void create( const std::string& path );
00032       static bool isFile( const std::string& path );
00033       static bool isDirectory( const std::string& path );
00034       static bool exists( const std::string& path );
00035       static void remove( const std::string& path );
00036       static void rename( const std::string& oldPath, const std::string& newPath );
00037       static void make( const std::string& path );
00038 
00039       static std::string trim( const std::string& path );
00040       static std::string relative( const std::string& basePath, const std::string absolutePath );
00041 
00042       static char pathSeparator();
00043 
00044       static std::string combine( const std::string& root, const std::string& addition );
00045       static std::string extension( const std::string& path );
00046       static std::string directory( const std::string& path );
00047       static std::string filename( const std::string& path );
00048       static std::string basename( const std::string& path );
00049     };
00050   }
00051 }
00052 
00053 #endif // INDRI_PATH_HPP
00054 

Generated on Tue Jun 15 11:02:55 2010 for Lemur by doxygen 1.3.4