Add a testcase for the previous fix.
[glib.git] / glib / gstdio.h
blobb4e0d03d4e3aa636eff41481956b3c95c890ddcd
1 /* gstdio.h - GFilename wrappers for C library functions
3 * Copyright 2004 Tor Lillqvist
5 * GLib is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * GLib is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with GLib; see the file COPYING.LIB. If not,
17 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __G_STDIO_H__
22 #define __G_STDIO_H__
24 #include <glib/gprintf.h>
26 #include <sys/stat.h>
28 /* Wrappers for C library functions that take pathname arguments. On
29 * Unix, the pathname is a file name as it literally is in the file
30 * system. On well-maintained systems with consistent users who know
31 * what they are doing and no exchange of files with others this would
32 * be a well-defined encoding, preferrably UTF-8. On Windows, the
33 * pathname is always in UTF-8, even if that is not the on-disk
34 * encoding or the encoding used by the Win32 API.
37 int g_open (const gchar *filename,
38 int flags,
39 int mode);
41 int g_rename (const gchar *oldfilename,
42 const gchar *newfilename);
44 int g_mkdir (const gchar *filename,
45 int mode);
47 int g_stat (const gchar *filename,
48 struct stat *buf);
50 int g_lstat (const gchar *filename,
51 struct stat *buf);
53 int g_unlink (const gchar *filename);
55 int g_remove (const gchar *filename);
57 FILE *g_fopen (const gchar *filename,
58 const gchar *mode);
60 FILE *g_freopen (const gchar *filename,
61 const gchar *mode,
62 FILE *stream);
64 #endif /* __G_STDIO_H__ */