Function
GLibremove
since: 2.6
Declaration [src]
int
g_remove (
const gchar* filename
)
Description [src]
A wrapper for the POSIX remove()
function. The remove()
function
deletes a name from the filesystem.
See your C library manual for more details about how remove()
works
on your system. On Unix, remove()
removes also directories, as it
calls unlink()
for files and rmdir()
for directories. On Windows,
although remove()
in the C library only works for files, this
function tries first remove()
and then if that fails rmdir(), and
thus works for both files and directories. Note however, that on
Windows, it is in general not possible to remove a file that is
open to some process, or mapped into memory.
If this function fails on Windows you can’t infer too much from the
errno value. rmdir()
is tried regardless of what caused remove()
to
fail. Any errno value set by remove()
will be overwritten by that
set by rmdir().
Available since: 2.6