Creates a Gio.File with the given argument from the command line.
The value of arg can be either a URI, an absolute path or a
relative path resolved relative to the current working directory.
This operation never fails, but the returned object might not
support any I/O operation if arg points to a malformed path.
Note that on Windows, this function expects its argument to be in
UTF-8 -- not the system code page. This means that you
should not use this function with string from argv as it is passed
to main(). g_win32_get_command_line() will return a UTF-8 version of
the commandline. Gio.Application also uses UTF-8 but
g_application_command_line_create_file_for_arg() may be more useful
for you there. It is also always possible to use this function with
GLib.OptionContext arguments of type GLib.OptionArg.FILENAME.
a command line string
Creates a Gio.File with the given argument from the command line.
This function is similar to g_file_new_for_commandline_arg() except
that it allows for passing the current working directory as an
argument instead of using the current working directory of the
process.
This is useful if the commandline argument was given in a context other than the invocation of the current process.
See also g_application_command_line_create_file_for_arg().
a command line string
the current working directory of the commandline
Opens a file in the preferred directory for temporary files (as
returned by g_get_tmp_dir()) and returns a Gio.File and
Gio.FileIOStream pointing to it.
tmpl should be a string in the GLib file name encoding
containing a sequence of six 'X' characters, and containing no
directory components. If it is null, a default template is used.
Unlike the other Gio.File constructors, this will return null if
a temporary file could not be created.
Template for the file name, as in g_file_open_tmp(), or null for a default template
Asynchronously opens a file in the preferred directory for temporary files
(as returned by g_get_tmp_dir()) as g_file_new_tmp().
tmpl should be a string in the GLib file name encoding
containing a sequence of six 'X' characters, and containing no
directory components. If it is null, a default template is used.
Template for the file name, as in g_file_open_tmp(), or null for a default template
the I/O priority of the request
Optionalcancellable: Gio.Cancellableoptional Gio.Cancellable object, null to ignore
Optionalcallback: AsyncReadyCallback<Gio.File>a Gio.AsyncReadyCallback to call when the request is done
Asynchronously creates a directory in the preferred directory for
temporary files (as returned by g_get_tmp_dir()) as g_dir_make_tmp().
tmpl should be a string in the GLib file name encoding
containing a sequence of six 'X' characters, and containing no
directory components. If it is null, a default template is used.
Template for the file name, as in g_dir_make_tmp(), or null for a default template
the I/O priority of the request
Optionalcancellable: Gio.Cancellableoptional Gio.Cancellable object, null to ignore
Optionalcallback: AsyncReadyCallback<Gio.File>a Gio.AsyncReadyCallback to call when the request is done
Finishes a temporary directory creation started by
g_file_new_tmp_dir_async().
Finishes a temporary file creation started by g_file_new_tmp_async().
Constructs a Gio.File with the given parse_name (i.e. something
given by g_file_get_parse_name()). This operation never fails,
but the returned object might not support any I/O operation if
the parse_name cannot be parsed.
a file name or path to be parsed
Constructs a Gio.File from a vector of elements using the correct separator for filenames.
Using this function is equivalent to calling
g_build_filenamev(), followed byg_file_new_for_path()on the result.