File.newForCommandlineArgAndCwd

gio.file.File newForCommandlineArgAndCwd(string arg, string cwd)

Creates a #GFile with the given argument from the command line.

This function is similar to [gio.file.File.newForCommandlineArg] 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 [gio.application_command_line.ApplicationCommandLine.createFileForArg].

Parameters

arga command line string
cwdthe current working directory of the commandline

Returns

a new #GFile