DesktopEntry.tryExecValue

Set TryExec value escaping it if needed.

  1. string tryExecValue()
  2. string tryExecValue(string tryExec)
    class DesktopEntry
    @safe
    string
    tryExecValue
    (
    string tryExec
    )

Throws

IniLikeEntryException if tryExec is not abolute path nor base name.

Examples

auto df = new DesktopFile();
assertNotThrown(df.tryExecValue = "base");
version(Posix) {
    assertNotThrown(df.tryExecValue = "/absolute/path");
}
assertThrown(df.tryExecValue = "not/absolute");
assertThrown(df.tryExecValue = "./relative");

Meta