Method
GioFileget_child_for_display_name
Declaration [src]
GFile*
g_file_get_child_for_display_name (
GFile* file,
const char* display_name,
GError** error
)
Description [src]
Gets the child of file
for a given display_name
(i.e. a UTF-8
version of the name). If this function fails, it returns NULL
and error
will be set. This is very useful when constructing a
GFile
for a new file and the user entered the filename in the
user interface, for instance when you select a directory and
type a filename in the file selector.
This call does no blocking I/O.
Parameters
display_name
-
Type:
const char*
String to a possible child.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the method if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GFile
A GFile
to the specified child, or
NULL
if the display name couldn’t be converted.
Free the returned object with g_object_unref().
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |