public function withDir(string $dir): self
    {
        $builder = clone $this;
        $builder->dir = $dir;
        
        return $builder;
    }
public function withDir(string $dir): self
    {
        $builder = clone $this;
        $builder->dir = $dir;
        
        return $builder;
    }
public function withDir ( string $ dir ) : self { $ builder = clone $ this ; $ builder -> dir = $ dir ; return $ builder ; }
Set the working directory to be used by the process.

@param string $dir Working directory.
Set the working directory to be used by the process .