Resolves the final redirect target path. If the target is an existing directory and the source command is cat <file>, resolves to <dir>/<basename>. Returns Err (with message on errorStack) when the filename cannot be determined.
cat <file>
<dir>/<basename>
The redirect target path as written by the user.
The command whose output is being redirected.
Ok(resolved path) or Err on failure.
Resolves the final redirect target path. If the target is an existing directory and the source command is
cat <file>, resolves to<dir>/<basename>. Returns Err (with message on errorStack) when the filename cannot be determined.