edelib
2.0.0
|
00001 /* 00002 * $Id: Directory.h 2844 2009-09-29 10:10:26Z karijes $ 00003 * 00004 * Directory handlers 00005 * Copyright (c) 2005-2007 edelib authors 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef __EDELIB_DIRECTORY_H__ 00022 #define __EDELIB_DIRECTORY_H__ 00023 00024 #include "String.h" 00025 #include "List.h" 00026 00033 #define E_DIR_SEPARATOR '/' 00034 00041 #define E_DIR_SEPARATOR_STR "/" 00042 00043 EDELIB_NS_BEGIN 00044 00049 EDELIB_API bool dir_exists(const char* name) EDELIB_DEPRECATED; 00050 00055 EDELIB_API bool dir_readable(const char* name) EDELIB_DEPRECATED; 00056 00061 EDELIB_API bool dir_writeable(const char* name) EDELIB_DEPRECATED; 00062 00070 EDELIB_API bool dir_create(const char* name, int perm = 0777); 00071 00078 EDELIB_API bool dir_create_with_parents(const char* name, int perm = 0777); 00079 00085 EDELIB_API bool dir_remove(const char* name); 00086 00091 EDELIB_API bool dir_rename(const char* from, const char* to); 00092 00106 EDELIB_API bool dir_empty(const char* name); 00107 00111 EDELIB_API String dir_home(void); 00112 00116 EDELIB_API String dir_current(void); 00117 00135 EDELIB_API bool dir_list(const char* dir, list<String>& lst, bool full_path = false, bool show_hidden = false, 00136 bool show_dots = false); 00137 00138 EDELIB_NS_END 00139 #endif 00140