Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
function ExpandUNCFileName(const S: FileName): string;
Retrieves the full path and filename of a specified (relative) file using Universal Naming Convention for network files.
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 G:\SomeSharedFolder and drive G is mapped to \\CompanyServer\AllSharedFolders ExpandUNCFileName('afile.ext') returns "\\CompanyServer\AllSharedFolders\SomeSharedFolder\afile.ext".
ShowMessage(ExpandUNCFileName('afile.ext'));
//displays "\\CompanyServer\AllSharedFolders\SomeSharedFolder\afile.ext"
//if the working directory is G:\SomeSharedFolder
//and drive G is mapped to "\\CompanyServer\AllSharedFolders"
|
Network programming
Working with network connections from Delphi.
TNetDrive
TNetDrive is a non-visual component that connects a network path to a drive name. Full source code.
ExpandFileName,
ExtractFileName,
FileExists,
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|