filesys_tools.h
Go to the documentation of this file.
00001 // HOG-Man - Hierarchical Optimization for Pose Graphs on Manifolds
00002 // Copyright (C) 2010 G. Grisetti, R. K├╝mmerle, C. Stachniss
00003 // 
00004 // HOG-Man is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU Lesser General Public License as published
00006 // by the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // HOG-Man is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU Lesser General Public License for more details.
00013 // 
00014 // You should have received a copy of the GNU Lesser General Public License
00015 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017 #ifndef FILESYS_TOOLS_H
00018 #define FILESYS_TOOLS_H
00019 
00020 
00022 // @{
00023 
00028 #include <string>
00029 #include <vector>
00030 #include <sys/types.h>
00031 
00032 namespace AISNavigation {
00033 
00038 std::string getFileExtension(const std::string& filename);
00039 
00044 std::string getPureFilename(const std::string& filename);
00045 
00050 std::string changeFileExtension(const std::string& filename, const std::string& newExt, bool stripDot = false);
00051 
00056 std::string getBasename(const std::string& filename);
00057 
00062 std::string getDirname(const std::string& filename);
00063 
00067 bool fileExists(const char* filename);
00068 
00072 bool isRegularFile(const char* filename);
00073 
00077 bool isDirectory(const char* filename);
00078 
00082 bool isSymbolicLink(const char* filename);
00083 
00089 off_t getFileSize(const char* filename);
00090 
00094 std::string getCurrentDateAsFilename();
00095 
00097 time_t getLastModificationDate(const char* filename);
00098 
00100 time_t getLastAccessDate(const char* filename);
00101 
00103 time_t getLastStatusChangeDate(const char* filename);
00104 
00109 bool createDirectory(const char* dirName, bool pub = false);
00110 
00115 std::vector<std::string> getDirectoryElements(const char* dir, bool onlyFiles = false);
00116 
00120 std::vector<std::string> getFilesByPattern(const char* pattern);
00121 
00122 } // end namespace
00123 // @}
00124 #endif


hogman_minimal
Author(s): Maintained by Juergen Sturm
autogenerated on Mon Oct 6 2014 00:06:58