|
limal
|
00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | _ _ _ _ __ _ | 00004 | | | | | | \_/ | / \ | | | 00005 | | | | | | |_| | / /\ \ | | | 00006 | | |__ | | | | | | / ____ \ | |__ | 00007 | |____||_| |_| |_|/ / \ \|____| | 00008 | | 00009 | core library | 00010 | | 00011 | (C) SUSE Linux Products GmbH | 00012 \----------------------------------------------------------------------/ 00013 00014 File: PathUtils.hpp 00015 00016 Author: Michael Calmer 00017 Michael Andres 00018 Maintainer: Michael Calmer 00019 00020 Purpose: 00021 00022 /-*/ 00029 #ifndef LIMAL_PATH_UTILS_HPP 00030 #define LIMAL_PATH_UTILS_HPP 00031 00032 #include <limal/config.h> 00033 #include <limal/PathName.hpp> 00034 #include <blocxx/List.hpp> 00035 00036 00037 namespace LIMAL_NAMESPACE 00038 { 00039 00043 namespace path 00044 { 00045 00063 int createDir(const PathName &path, mode_t mode = 0755); 00064 00065 00080 int createDirRecursive(const PathName &path, mode_t mode = 0755); 00081 00082 00092 int removeDir(const PathName& path); 00093 00094 00108 int removeDirRecursive(const PathName& path ); 00109 00110 00120 int copyDir(const PathName& srcPath, const PathName& destPath); 00121 00129 int readDir(blocxx::List<blocxx::String> & retlist, 00130 const PathName& path, bool dots); 00131 00137 int removeFile(const PathName& path); 00138 00144 int moveFile(const PathName& oldPath, const PathName& newPath); 00145 00152 int copyFile(const PathName& file, const PathName& dest); 00153 00160 int symLink(const PathName& oldPath, const PathName& newPath); 00161 00167 int changeMode(const PathName& path, mode_t mode); 00168 00172 // int changeOwner(const PathName& path, const String& uid, const String& gid); 00173 00174 } 00175 } 00176 00177 #endif /* LIMAL_PATH_UTILS_HPP */
1.7.5.1