Gio.File.new_for_commandline_arg_and_cwd
Description: Reference for Gio.File.new_for_commandline_arg_and_cwd

### Function

# Gio Filenew_for_commandline_arg_and_cwd

since: 2.36

#### Declaration [src]

    GFile*
    g_file_new_for_commandline_arg_and_cwd (
      const gchar* arg,
      const gchar* cwd
    )

#### Description [src]

Creates a `GFile` 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().

Available since: 2.36

#### Parameters

`arg`

  Type: `const gchar*`

  A command line string.

  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.

`cwd`

  Type: `const gchar*`

  The current working directory of the commandline.

  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.

#### Return value

Type: `GFile`

A new `GFile`.

The caller of the function takes ownership of the data, and is responsible for freeing it.