epoc32/include/stdapis/glib-2.0/glib/gfileutils.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/gfileutils.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/gfileutils.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,121 @@
     1.4 -gfileutils.h
     1.5 +/* gfileutils.h - File utility functions
     1.6 + *
     1.7 + *  Copyright 2000 Red Hat, Inc.
     1.8 + * Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
     1.9 + *
    1.10 + * GLib is free software; you can redistribute it and/or modify it
    1.11 + * under the terms of the GNU Lesser General Public License as
    1.12 + * published by the Free Software Foundation; either version 2 of the
    1.13 + * License, or (at your option) any later version.
    1.14 + *
    1.15 + * GLib is distributed in the hope that it will be useful,
    1.16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.18 + * Lesser General Public License for more details.
    1.19 + *
    1.20 + * You should have received a copy of the GNU Lesser General Public
    1.21 + * License along with GLib; see the file COPYING.LIB.  If not,
    1.22 + * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1.23 + *   Boston, MA 02111-1307, USA.
    1.24 + */
    1.25 +
    1.26 +#ifndef __G_FILEUTILS_H__
    1.27 +#define __G_FILEUTILS_H__
    1.28 +
    1.29 +#include <_ansi.h>
    1.30 +#include <glib/gerror.h>
    1.31 +
    1.32 +G_BEGIN_DECLS
    1.33 +
    1.34 +#define G_FILE_ERROR g_file_error_quark ()
    1.35 +
    1.36 +typedef enum
    1.37 +{
    1.38 +  G_FILE_ERROR_EXIST,
    1.39 +  G_FILE_ERROR_ISDIR,
    1.40 +  G_FILE_ERROR_ACCES,
    1.41 +  G_FILE_ERROR_NAMETOOLONG,
    1.42 +  G_FILE_ERROR_NOENT,
    1.43 +  G_FILE_ERROR_NOTDIR,
    1.44 +  G_FILE_ERROR_NXIO,
    1.45 +  G_FILE_ERROR_NODEV,
    1.46 +  G_FILE_ERROR_ROFS,
    1.47 +  G_FILE_ERROR_TXTBSY,
    1.48 +  G_FILE_ERROR_FAULT,
    1.49 +  G_FILE_ERROR_LOOP,
    1.50 +  G_FILE_ERROR_NOSPC,
    1.51 +  G_FILE_ERROR_NOMEM,
    1.52 +  G_FILE_ERROR_MFILE,
    1.53 +  G_FILE_ERROR_NFILE,
    1.54 +  G_FILE_ERROR_BADF,
    1.55 +  G_FILE_ERROR_INVAL,
    1.56 +  G_FILE_ERROR_PIPE,
    1.57 +  G_FILE_ERROR_AGAIN,
    1.58 +  G_FILE_ERROR_INTR,
    1.59 +  G_FILE_ERROR_IO,
    1.60 +  G_FILE_ERROR_PERM,
    1.61 +  G_FILE_ERROR_NOSYS,
    1.62 +  G_FILE_ERROR_FAILED
    1.63 +} GFileError;
    1.64 +
    1.65 +/* For backward-compat reasons, these are synced to an old 
    1.66 + * anonymous enum in libgnome. But don't use that enum
    1.67 + * in new code.
    1.68 + */
    1.69 +typedef enum
    1.70 +{
    1.71 +  G_FILE_TEST_IS_REGULAR    = 1 << 0,
    1.72 +  G_FILE_TEST_IS_SYMLINK    = 1 << 1,
    1.73 +  G_FILE_TEST_IS_DIR        = 1 << 2,
    1.74 +  G_FILE_TEST_IS_EXECUTABLE = 1 << 3,
    1.75 +  G_FILE_TEST_EXISTS        = 1 << 4
    1.76 +} GFileTest;
    1.77 +
    1.78 +IMPORT_C GQuark     g_file_error_quark      (void);
    1.79 +/* So other code can generate a GFileError */
    1.80 +IMPORT_C GFileError g_file_error_from_errno (gint err_no);
    1.81 +
    1.82 +#ifdef G_OS_WIN32
    1.83 +#define g_file_test g_file_test_utf8
    1.84 +#define g_file_get_contents g_file_get_contents_utf8
    1.85 +#define g_mkstemp g_mkstemp_utf8
    1.86 +#define g_file_open_tmp g_file_open_tmp_utf8
    1.87 +#endif
    1.88 +
    1.89 +IMPORT_C gboolean g_file_test         (const gchar  *filename,
    1.90 +                              GFileTest     test);
    1.91 +IMPORT_C gboolean g_file_get_contents (const gchar  *filename,
    1.92 +                              gchar       **contents,
    1.93 +                              gsize        *length,    
    1.94 +                              GError      **error);
    1.95 +IMPORT_C gboolean g_file_set_contents (const gchar *filename,
    1.96 +			      const gchar *contents,
    1.97 +			      gssize	     length,
    1.98 +			      GError	   **error);
    1.99 +IMPORT_C gchar   *g_file_read_link    (const gchar  *filename,
   1.100 +			      GError      **error);
   1.101 +
   1.102 +/* Wrapper / workalike for mkstemp() */
   1.103 +IMPORT_C gint    g_mkstemp            (gchar        *tmpl);
   1.104 +
   1.105 +/* Wrapper for g_mkstemp */
   1.106 +IMPORT_C gint    g_file_open_tmp      (const gchar  *tmpl,
   1.107 +			      gchar       **name_used,
   1.108 +			      GError      **error);
   1.109 +
   1.110 +IMPORT_C gchar *g_build_path     (const gchar *separator,
   1.111 +			 const gchar *first_element,
   1.112 +			 ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
   1.113 +IMPORT_C gchar *g_build_pathv    (const gchar  *separator,
   1.114 +			 gchar       **args) G_GNUC_MALLOC;
   1.115 +
   1.116 +IMPORT_C gchar *g_build_filename (const gchar *first_element,
   1.117 +			 ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
   1.118 +IMPORT_C gchar *g_build_filenamev (gchar      **args) G_GNUC_MALLOC;
   1.119 +
   1.120 +IMPORT_C int    g_mkdir_with_parents (const gchar *pathname,
   1.121 +			     int          mode);
   1.122 +
   1.123 +G_END_DECLS
   1.124 +
   1.125 +#endif /* __G_FILEUTILS_H__ */