Directory.h
/*
* $Id: Directory.h 2844 2009-09-29 10:10:26Z karijes $
*
* Directory handlers
* Copyright (c) 2005-2007 edelib authors
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EDELIB_DIRECTORY_H__
#define __EDELIB_DIRECTORY_H__
#include "String.h"
#include "List.h"
#define E_DIR_SEPARATOR '/'
#define E_DIR_SEPARATOR_STR "/"
EDELIB_NS_BEGIN
EDELIB_API bool dir_exists(const char* name) EDELIB_DEPRECATED;
EDELIB_API bool dir_readable(const char* name) EDELIB_DEPRECATED;
EDELIB_API bool dir_writeable(const char* name) EDELIB_DEPRECATED;
EDELIB_API bool dir_create(const char* name, int perm = 0777);
EDELIB_API bool dir_create_with_parents(const char* name, int perm = 0777);
EDELIB_API bool dir_remove(const char* name);
EDELIB_API bool dir_rename(const char* from, const char* to);
EDELIB_API bool dir_empty(const char* name);
EDELIB_API String dir_home(void);
EDELIB_API String dir_current(void);
EDELIB_API bool dir_list(const char* dir, list<String>& lst, bool full_path = false, bool show_hidden = false,
bool show_dots = false);
EDELIB_NS_END
#endif