Function
Valentget_user_file
unstable since: 1.0
Declaration [src]
GFile*
valent_get_user_file (
const char* dirname,
const char* basename,
gboolean unique
)
Description [src]
A convenience for creating a GFile
.
If unique
is true, the returned file is guaranteed not to exist. If
basename
exists in dirname
, the resulting file’s name will have a
parenthesized number appended to it (e.g. image.png (2)
).
Available since: 1.0
Parameters
dirname
-
Type:
const char*
A directory path.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. basename
-
Type:
const char*
A file name.
The data is owned by the caller of the function. The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. unique
-
Type:
gboolean
Whether the resulting filepath should be unique.
Return value
Type: GFile
A GFile
.
The caller of the function takes ownership of the data, and is responsible for freeing it. |