RAD Studio VCL Reference
SysUtils.ExpandUNCFileName Function

Returns the full path of a file name in UNC format, if appropriate.

function ExpandUNCFileName(const FileName: string): string; overload;
AnsiString ExpandUNCFileName(const AnsiString FileName);

ExpandUNCFileName returns the fully-qualified file name for a specified file name.

Note: On Windows, ExpandUNCFileName returns a fully qualified path name using Universal Naming Convention for network files. For files on local disks, ExpandUNCFileName is equivalent to ExpandFileName. In a UNC file name, the drive prefix is replaced with the name of the network resource to which the drive is mapped. For example, if the working directory is J:\ourdir and drive J is mapped to \\ourserver\ourshare, ExpandUNCFileName('ourfile') returns "\\ourserver\ourshare\ourdir\ourfile".
Note: On Linux, ExpandUNCFileName is always equivalent to ExpandFileName.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!