RESOLVE resolve path

resolve path, to cwd if relative effectively canonical(absolute(p))

Contents

Inputs

Outputs

function r = resolve(p, expand_tilde)
arguments
  p (1,1) string
  expand_tilde (1,1) logical = true
end


r = stdlib.canonical(stdlib.absolute(p, "", expand_tilde), false);

end

%!assert (resolve('', 1), stdlib.posix(pwd()))