edelib 2.1.0
Directory.h
1/*
2 * $Id: Directory.h 2844 2009-09-29 10:10:26Z karijes $
3 *
4 * Directory handlers
5 * Copyright (c) 2005-2007 edelib authors
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __EDELIB_DIRECTORY_H__
22#define __EDELIB_DIRECTORY_H__
23
24#include "String.h"
25#include "List.h"
26
33#define E_DIR_SEPARATOR '/'
34
41#define E_DIR_SEPARATOR_STR "/"
42
43EDELIB_NS_BEGIN
44
49EDELIB_API bool dir_exists(const char* name) EDELIB_DEPRECATED;
50
55EDELIB_API bool dir_readable(const char* name) EDELIB_DEPRECATED;
56
61EDELIB_API bool dir_writeable(const char* name) EDELIB_DEPRECATED;
62
70EDELIB_API bool dir_create(const char* name, int perm = 0777);
71
78EDELIB_API bool dir_create_with_parents(const char* name, int perm = 0777);
79
85EDELIB_API bool dir_remove(const char* name);
86
91EDELIB_API bool dir_rename(const char* from, const char* to);
92
106EDELIB_API bool dir_empty(const char* name);
107
111EDELIB_API String dir_home(void);
112
116EDELIB_API String dir_current(void);
117
135EDELIB_API bool dir_list(const char* dir, list<String>& lst, bool full_path = false, bool show_hidden = false,
136 bool show_dots = false);
137
138EDELIB_NS_END
139#endif
140
A (relatively simple) string implementation.
Definition String.h:82
Linked list class.
Definition List.h:160
bool dir_exists(const char *name)
bool dir_remove(const char *name)
bool dir_empty(const char *name)
bool dir_create(const char *name, int perm=0777)
bool dir_readable(const char *name)
bool dir_create_with_parents(const char *name, int perm=0777)
bool dir_list(const char *dir, list< String > &lst, bool full_path=false, bool show_hidden=false, bool show_dots=false)
bool dir_rename(const char *from, const char *to)
bool dir_writeable(const char *name)
String dir_current(void)
String dir_home(void)