DesktopEntry.tryExecValue - multiple declarations
Function DesktopEntry.tryExecValue
Value used to determine if the program is actually installed.
string tryExecValue() pure nothrow @safe const;
If the path is not an absolute path, the file should be looked up in the PATH environment variable. If the file is not present or if it is not executable, the entry may be ignored (not be used in menus, for example).
Returns
The unescaped value associated with "TryExec" key.
See Also
Function DesktopEntry.tryExecValue
Set TryExec value escaping it if needed.
string tryExecValue
(
string tryExec
) @safe;
Throws
IniLikeEntryException if tryExec is not abolute path nor base name.
Example
auto df = new DesktopFile();
assertNotThrown(df .tryExecValue = "base");
version(Posix) {
assertNotThrown(df .tryExecValue = "/absolute/path");
}
assertThrown(df .tryExecValue = "not/absolute");
assertThrown(df .tryExecValue = "./relative");