00001 /*************************************************************************** 00002 * CVSID: $Id: dir.h,v 1.6 2004/08/29 18:43:23 stefanb Exp $ 00003 * 00004 * dir.h : Functions for handling directories 00005 * 00006 * Copyright (C) 2004 Stefan Bambach, <sbambach@gmx.net> 00007 * 00008 * Licensed under the GNU General Public License 2.0 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 * 00024 **************************************************************************/ 00025 00026 00039 #ifndef __LIBSB_DIR_H__ 00040 #define __LIBSB_DIR_H__ 00041 00042 00043 #ifdef HAVE_CONFIG_H 00044 # include <config.h> 00045 #endif 00046 00047 00048 #if defined(__cplusplus) 00049 extern "C" { 00050 #endif 00051 00052 00053 00054 #define LAST_CHAR(buf) buf[strlen(buf)-1] 00055 #define DIRSEP '/' 00065 int sb_dir_is_dir(char *dirpath); 00066 00067 00068 00075 int sb_dir_remove(char *dirpath); 00076 00077 00078 00087 int sb_dir_mkdirs(const char *pathname, mode_t mode, int *error); 00088 00089 00090 00099 int sb_dir_rmdirs(char *dirname); 00100 00101 00102 00103 #if defined(__cplusplus) 00104 } 00105 #endif 00106 00107 #endif 00108 00109