Pascal Scripting: PathConvertNormalToSuper

Prototype:

function PathConvertNormalToSuper(const Filename: String): String;

Description:

Converts a normal path to a fully qualified extended-length path (also known as a super path). Does not fail if the specified path already is an extended-length path.

An empty string is returned if the input is an empty string or contains only spaces.

An exception will be raised upon failure, which is only known to happen when the input or output path exceeds 32K characters.

Example:
var
  SuperPath: String;
begin
  SuperPath := PathConvertNormalToSuper('C:\Windows');
  Log(SuperPath);  // Logs '\\?\C:\Windows'

  SuperPath := PathConvertNormalToSuper('\\server\share\filename');
  Log(SuperPath);  // Logs '\\?\UNC\server\share\filename'
end;
See also:

ApplyPathRedirRules
PathConvertSuperToNormal