mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-01 08:34:53 +02:00
Update.
2004-12-13 Tor Lillqvist <tml@iki.fi> * NEWS: Update. * glib/glib.symbols * glib/gstdio.[ch]: Add g_rmdir().
This commit is contained in:
parent
91d854761c
commit
b17c8523d9
@ -1,3 +1,10 @@
|
|||||||
|
2004-12-13 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* NEWS: Update.
|
||||||
|
|
||||||
|
* glib/glib.symbols
|
||||||
|
* glib/gstdio.[ch]: Add g_rmdir().
|
||||||
|
|
||||||
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* NEWS: Updates
|
* NEWS: Updates
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-12-13 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* NEWS: Update.
|
||||||
|
|
||||||
|
* glib/glib.symbols
|
||||||
|
* glib/gstdio.[ch]: Add g_rmdir().
|
||||||
|
|
||||||
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* NEWS: Updates
|
* NEWS: Updates
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-12-13 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* NEWS: Update.
|
||||||
|
|
||||||
|
* glib/glib.symbols
|
||||||
|
* glib/gstdio.[ch]: Add g_rmdir().
|
||||||
|
|
||||||
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* NEWS: Updates
|
* NEWS: Updates
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-12-13 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* NEWS: Update.
|
||||||
|
|
||||||
|
* glib/glib.symbols
|
||||||
|
* glib/gstdio.[ch]: Add g_rmdir().
|
||||||
|
|
||||||
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* NEWS: Updates
|
* NEWS: Updates
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2004-12-13 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* NEWS: Update.
|
||||||
|
|
||||||
|
* glib/glib.symbols
|
||||||
|
* glib/gstdio.[ch]: Add g_rmdir().
|
||||||
|
|
||||||
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
2004-12-13 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* NEWS: Updates
|
* NEWS: Updates
|
||||||
|
4
NEWS
4
NEWS
@ -6,7 +6,7 @@ Overview of Changes from GLib 2.4.x to GLib 2.6.0
|
|||||||
- GKeyFile, a parser/editor for the .ini like files
|
- GKeyFile, a parser/editor for the .ini like files
|
||||||
- Functions to support the XDG basedir specification
|
- Functions to support the XDG basedir specification
|
||||||
- Wrappers for common POSIX pathname functions to handle filename
|
- Wrappers for common POSIX pathname functions to handle filename
|
||||||
encodings consistently
|
encodings consistently. On Windows, these use UTF-8.
|
||||||
|
|
||||||
* Miscellaneous new functions
|
* Miscellaneous new functions
|
||||||
- g_filename_display_name() converts filenames in displayable UTF-8 strings
|
- g_filename_display_name() converts filenames in displayable UTF-8 strings
|
||||||
@ -28,6 +28,8 @@ Overview of Changes from GLib 2.4.x to GLib 2.6.0
|
|||||||
- Reduce code size by removing literal strings from g_return_if_fail()
|
- Reduce code size by removing literal strings from g_return_if_fail()
|
||||||
|
|
||||||
* Other changes
|
* Other changes
|
||||||
|
- On Windows, GLib functions that take file name arguments now require
|
||||||
|
those to be in UTF-8. Functions that return file names return UTF-8.
|
||||||
- Use higher precision for mathematical constants
|
- Use higher precision for mathematical constants
|
||||||
- Don't convert to/from UTF-8 in g_filename_to_uri/g_filename_from_uri
|
- Don't convert to/from UTF-8 in g_filename_to_uri/g_filename_from_uri
|
||||||
- Support ll as printf format modifier for long long on all platforms
|
- Support ll as printf format modifier for long long on all platforms
|
||||||
|
@ -621,6 +621,7 @@ g_relation_select
|
|||||||
g_remove
|
g_remove
|
||||||
g_rename
|
g_rename
|
||||||
g_return_if_fail_warning
|
g_return_if_fail_warning
|
||||||
|
g_rmdir
|
||||||
g_scanner_cur_line
|
g_scanner_cur_line
|
||||||
g_scanner_cur_position
|
g_scanner_cur_position
|
||||||
g_scanner_cur_token
|
g_scanner_cur_token
|
||||||
|
@ -338,10 +338,10 @@ g_unlink (const gchar *filename)
|
|||||||
* on your system. On Unix, remove() removes also directories, as it
|
* on your system. On Unix, remove() removes also directories, as it
|
||||||
* calls unlink() for files and rmdir() for directories. On Windows,
|
* calls unlink() for files and rmdir() for directories. On Windows,
|
||||||
* although remove() in the C library only works for files, this
|
* although remove() in the C library only works for files, this
|
||||||
* function tries both remove() and rmdir(), and thus works like on
|
* function tries first remove() and then if that fails rmdir(), and
|
||||||
* Unix. Note however, that on Windows, it is in general not possible
|
* thus works for both files and directories. Note however, that on
|
||||||
* to remove a file that is open to some process, or mapped into
|
* Windows, it is in general not possible to remove a file that is
|
||||||
* memory.
|
* open to some process, or mapped into memory.
|
||||||
*
|
*
|
||||||
* Returns: 0 if the file was successfully removed, -1 if an error
|
* Returns: 0 if the file was successfully removed, -1 if an error
|
||||||
* occurred
|
* occurred
|
||||||
@ -389,6 +389,52 @@ g_remove (const gchar *filename)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_rmdir:
|
||||||
|
* @filename: a pathname in the GLib file name encoding
|
||||||
|
*
|
||||||
|
* A wrapper for the POSIX rmdir() function. The rmdir() function
|
||||||
|
* deletes a directory from the filesystem.
|
||||||
|
*
|
||||||
|
* See your C library manual for more details about how rmdir() works
|
||||||
|
* on your system.
|
||||||
|
*
|
||||||
|
* Returns: 0 if the directory was successfully removed, -1 if an error
|
||||||
|
* occurred
|
||||||
|
*
|
||||||
|
* Since: 2.6
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
g_rmdir (const gchar *filename)
|
||||||
|
{
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
if (G_WIN32_HAVE_WIDECHAR_API ())
|
||||||
|
{
|
||||||
|
wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
|
||||||
|
int retval = _wrmdir (wfilename);
|
||||||
|
int save_errno = errno;
|
||||||
|
|
||||||
|
g_free (wfilename);
|
||||||
|
|
||||||
|
errno = save_errno;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gchar *cp_filename = g_locale_from_utf8 (filename, -1, NULL, NULL, NULL);
|
||||||
|
int retval = rmdir (cp_filename);
|
||||||
|
int save_errno = errno;
|
||||||
|
|
||||||
|
g_free (cp_filename);
|
||||||
|
|
||||||
|
errno = save_errno;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
return rmdir (filename);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_fopen:
|
* g_fopen:
|
||||||
* @filename: a pathname in the GLib file name encoding
|
* @filename: a pathname in the GLib file name encoding
|
||||||
|
@ -55,6 +55,8 @@ int g_unlink (const gchar *filename);
|
|||||||
|
|
||||||
int g_remove (const gchar *filename);
|
int g_remove (const gchar *filename);
|
||||||
|
|
||||||
|
int g_rmdir (const gchar *filename);
|
||||||
|
|
||||||
FILE *g_fopen (const gchar *filename,
|
FILE *g_fopen (const gchar *filename,
|
||||||
const gchar *mode);
|
const gchar *mode);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user