Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

file.h

00001 /***************************************************************************
00002  * CVSID: $Id: file.h,v 1.8 2004/08/29 18:43:23 stefanb Exp $
00003  *
00004  * file.h : Functions for handling files
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_FILE_H__
00040 #define __LIBSB_FILE_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 
00060 int sb_file_is_fifo(const char *filepath);
00061 
00062 
00063 
00070 int sb_file_is_file(const char *filepath);
00071 
00072 
00073 
00080 int sb_file_get_stamp(const char *filepath);
00081 
00082 
00083 
00090 int sb_file_get_size(const char *filepath);
00091 
00092 
00093 
00100 char *sb_file_read(const char *filepath);
00101 
00102 
00103 
00111 int sb_file_write(const char *filepath, char *data);
00112 
00113 
00114 
00121 int sb_file_remove(const char *filepath);
00122 
00123 
00124 
00133 int sb_file_open(const char *filepath, int flags);
00134 
00135 
00136 
00146 int sb_file_open_ext(const char *filepath, int flags, mode_t mode);
00147 
00148 
00149 
00160 int sb_file_close(int fd);
00161 
00162 
00163 
00173 int sb_file_set_lock(int fd, int type, int wait);
00174 
00175 
00176 
00182 int sb_file_lock_acquire_read(int fd);
00183 
00184 
00185 
00191 int sb_file_lock_acquire_read_wait(int fd);
00192 
00193 
00194 
00200 int sb_file_lock_acquire_write(int fd);
00201 
00202 
00203 
00209 int sb_file_lock_acquire_write_wait(int fd);
00210 
00211 
00212 
00218 int sb_file_lock_release(int fd);
00219 
00220 
00221 
00222 #if defined(__cplusplus)
00223 }
00224 #endif
00225 
00226 #endif
00227 
00228 

Generated on Wed Mar 30 13:43:26 2005 for Mntd by  doxygen 1.3.9.1