path.h

Go to the documentation of this file.
00001 
00015 #ifndef _DLR_PATH_H_
00016 #define _DLR_PATH_H_
00017 
00018 #include <string>
00019 #include <vector>
00020 
00021 namespace dlr {
00022 
00023   namespace utilities {
00024 
00036     bool
00037     isDirectory(const std::string& path);
00038   
00039   
00040     bool
00041     isExistingPath(const std::string& path);
00042   
00043   
00044     bool
00045     isRegularFile(const std::string& path);
00046     
00047     
00059     std::string
00060     joinPath(const std::string& part0, const std::string& part1);
00061 
00062   
00074     std::vector<std::string>
00075     listDirectory(const std::string& directoryName, bool fullPath=false);
00076 
00077 
00109     std::vector<std::string>
00110     recursiveListDirectory(const std::string& directoryName,
00111                            bool fullPath=false,
00112                            bool includeDirectoryNames=false);
00113   
00114   
00122     std::pair<std::string, std::string>
00123     splitExtension(const std::string& fileName);
00124 
00125 
00155     std::pair<std::string, std::string>
00156     splitPath(const std::string& path);
00157 
00158   } // namespace utilities
00159     
00160 } // namespace dlr
00161 
00162 
00163 /* ======= Declarations to maintain compatibility with legacy code. ======= */
00164 
00165 namespace dlr {
00166 
00167   using utilities::isDirectory;
00168   using utilities::isExistingPath;
00169   using utilities::isRegularFile;
00170   using utilities::joinPath;
00171   using utilities::listDirectory;
00172   using utilities::recursiveListDirectory;
00173   using utilities::splitExtension;
00174   using utilities::splitPath;
00175   
00176 } // namespace dlr
00177 
00178 
00179 #endif // #ifndef _DLR_PATH_H_

Generated on Mon Jul 9 20:34:03 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2