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

1 auto df = new DesktopFile();
2 assertNotThrown(df.tryExecValue = "base");
3 version(Posix) {
4     assertNotThrown(df.tryExecValue = "/absolute/path");
5 }
6 assertThrown(df.tryExecValue = "not/absolute");
7 assertThrown(df.tryExecValue = "./relative");

Meta