Show / Hide Table of Contents

Method filesystem.more.getFinalPath


Overload

Gets full normalized path of an existing file or directory or symbolic link target.

public static bool getFinalPath(string path, out string result, bool ofSymlink = false, FPFormat format = FPFormat.PrefixIfLong)
Parameters
path  (string)

Full or relative path. Supports environment variables (see pathname.expand).

result  (string)

Receives full path, or null if failed.

ofSymlink  (bool)

If path is of a symbolic link, get final path of the link, not of its target.

format  (FPFormat)

Result format.

Returns
bool

false if failed. For example if the path does not point to an existing file or directory. Supports lastError.

Exceptions
ArgumentException

Not full path.

Remarks

Calls API GetFinalPathNameByHandle.

Unlike pathname.normalize, this function works with existing files and directories, not any strings.

See Also

shortcutFile.getTarget