Move string utility docs inline
[platform/upstream/glib.git] / docs / reference / glib / tmpl / fileutils.sgml
index d0780e7..45cf73c 100644 (file)
@@ -2,11 +2,35 @@
 File Utilities
 
 <!-- ##### SECTION Short_Description ##### -->
-various file-related functions.
+various file-related functions
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
+There is a group of functions which wrap the common POSIX functions 
+dealing with filenames (g_open(), g_rename(), g_mkdir(), g_stat(), 
+g_unlink(), g_remove(), g_fopen(), g_freopen()). The point of these 
+wrappers is to make it possible to handle file names with any Unicode 
+characters in them on Windows without having to use ifdefs and the 
+wide character API in the application code.
+</para>
+<para>
+The pathname argument should be in the GLib file name encoding. On
+POSIX this is the actual on-disk encoding which might correspond to
+the locale settings of the process (or the 
+<envar>G_FILENAME_ENCODING</envar> environment variable), or not.
+</para>
+<para>
+On Windows the GLib file name encoding is UTF-8. Note that the
+Microsoft C library does not use UTF-8, but has separate APIs for
+current system code page and wide characters (UTF-16). The GLib
+wrappers call the wide character API if present (on modern Windows
+systems), otherwise convert to/from the system code page.
+</para>
 
+<para>
+Another group of functions allows to open and read directories
+in the GLib file name encoding. These are g_dir_open(), 
+g_dir_read_name(), g_dir_rewind(), g_dir_close().
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -14,6 +38,12 @@ various file-related functions.
 
 </para>
 
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### ENUM GFileError ##### -->
 <para>
 Values corresponding to <literal>errno</literal> codes returned from file operations
@@ -50,8 +80,8 @@ differences in when a system will report a given error, etc.
      couldn't find the device.  This can mean that the device file was
      installed incorrectly, or that the physical device is missing or
      not correctly attached to the computer.
-@G_FILE_ERROR_NODEV: This file is of a type that doesn't support
-     mapping.
+@G_FILE_ERROR_NODEV: The  underlying  file system of the specified file
+     does not support memory mapping.
 @G_FILE_ERROR_ROFS: The directory containing the new link can't be
           modified because it's on a read-only file system.
 @G_FILE_ERROR_TXTBSY: Text file busy.
@@ -94,7 +124,7 @@ differences in when a system will report a given error, etc.
      file (or other resource) or processes with special privileges can
      perform the operation.
 @G_FILE_ERROR_NOSYS: Function not implemented; this indicates that the
-    system is missing some functionality.  
+    system is missing some functionality.
 @G_FILE_ERROR_FAILED: Does not correspond to a UNIX error code; this
   is the standard "failed for unspecified reason" error code present in 
   all #GError error code enumerations. Returned if no specific
@@ -111,14 +141,17 @@ error domains.
 
 <!-- ##### ENUM GFileTest ##### -->
 <para>
-A test to perform an a file using g_file_test().
+A test to perform on a file using g_file_test().
 </para>
 
-@G_FILE_TEST_IS_REGULAR: %TRUE if the file is a regular file (not a symlink or directory)
+@G_FILE_TEST_IS_REGULAR: %TRUE if the file is a regular file (not a directory).
+    Note that this test will also return %TRUE if the tested file is a symlink
+    to a regular file.
 @G_FILE_TEST_IS_SYMLINK: %TRUE if the file is a symlink.
 @G_FILE_TEST_IS_DIR: %TRUE if the file is a directory.
 @G_FILE_TEST_IS_EXECUTABLE: %TRUE if the file is executable.
-@G_FILE_TEST_EXISTS: %TRUE if the file exists. It may or may not be a regular file.
+@G_FILE_TEST_EXISTS: %TRUE if the file exists. 
+    It may or may not be a regular file.
 
 <!-- ##### FUNCTION g_file_error_from_errno ##### -->
 <para>
@@ -141,6 +174,18 @@ A test to perform an a file using g_file_test().
 @Returns: 
 
 
+<!-- ##### FUNCTION g_file_set_contents ##### -->
+<para>
+
+</para>
+
+@filename: 
+@contents: 
+@length: 
+@error: 
+@Returns: 
+
+
 <!-- ##### FUNCTION g_file_test ##### -->
 <para>
 
@@ -160,6 +205,17 @@ A test to perform an a file using g_file_test().
 @Returns: 
 
 
+<!-- ##### FUNCTION g_mkstemp_full ##### -->
+<para>
+
+</para>
+
+@tmpl: 
+@flags: 
+@mode: 
+@Returns: 
+
+
 <!-- ##### FUNCTION g_file_open_tmp ##### -->
 <para>
 
@@ -181,6 +237,45 @@ A test to perform an a file using g_file_test().
 @Returns: 
 
 
+<!-- ##### FUNCTION g_mkdir_with_parents ##### -->
+<para>
+
+</para>
+
+@pathname: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_mkdtemp ##### -->
+<para>
+
+</para>
+
+@tmpl: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_mkdtemp_full ##### -->
+<para>
+
+</para>
+
+@tmpl: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_dir_make_tmp ##### -->
+<para>
+
+</para>
+
+@tmpl: 
+@error: 
+@Returns: 
+
+
 <!-- ##### STRUCT GDir ##### -->
 <para>
 An opaque structure representing an opened directory.
@@ -223,3 +318,219 @@ An opaque structure representing an opened directory.
 @dir: 
 
 
+<!-- ##### STRUCT GMappedFile ##### -->
+<para>
+The #GMappedFile represents a file mapping created with
+g_mapped_file_new(). It has only private members and should
+not be accessed directly.
+</para>
+
+
+<!-- ##### FUNCTION g_mapped_file_new ##### -->
+<para>
+
+</para>
+
+@filename: 
+@writable: 
+@error: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_mapped_file_ref ##### -->
+<para>
+
+</para>
+
+@file: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_mapped_file_unref ##### -->
+<para>
+
+</para>
+
+@file: 
+
+
+<!-- ##### FUNCTION g_mapped_file_free ##### -->
+<para>
+
+</para>
+
+@file: 
+
+
+<!-- ##### FUNCTION g_mapped_file_get_length ##### -->
+<para>
+
+</para>
+
+@file: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_mapped_file_get_contents ##### -->
+<para>
+
+</para>
+
+@file: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_open ##### -->
+<para>
+
+</para>
+
+@filename: 
+@flags: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_rename ##### -->
+<para>
+
+</para>
+
+@oldfilename: 
+@newfilename: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_mkdir ##### -->
+<para>
+
+</para>
+
+@filename: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### TYPEDEF GStatBuf ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION g_stat ##### -->
+<para>
+
+</para>
+
+@filename: 
+@buf: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_lstat ##### -->
+<para>
+
+</para>
+
+@filename: 
+@buf: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_unlink ##### -->
+<para>
+
+</para>
+
+@filename: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_remove ##### -->
+<para>
+
+</para>
+
+@filename: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_rmdir ##### -->
+<para>
+
+</para>
+
+@filename: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_fopen ##### -->
+<para>
+
+</para>
+
+@filename: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_freopen ##### -->
+<para>
+
+</para>
+
+@filename: 
+@mode: 
+@stream: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_chmod ##### -->
+<para>
+
+</para>
+
+@filename: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_access ##### -->
+<para>
+
+</para>
+
+@filename: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_creat ##### -->
+<para>
+
+</para>
+
+@filename: 
+@mode: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_chdir ##### -->
+<para>
+
+</para>
+
+@path: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_utime ##### -->
+<para>
+
+</para>
+
+@filename: 
+@utb: 
+@Returns: 
+
+