NET Link Tracker
PathCombineSafe Method
Example 



KellermanSoftware.NetLinkTracker Namespace > LinkLogic Class : PathCombineSafe Method
The base directory
The path that comes after the base directory
Combine a base directory with a file path, allowing for nulls. This is used internally with BaseDirectory
Syntax
'Declaration
 
Public Function PathCombineSafe( _
   ByVal baseDirectory As String, _
   ByVal filePath As String _
) As String
'Usage
 
Dim instance As LinkLogic
Dim baseDirectory As String
Dim filePath As String
Dim value As String
 
value = instance.PathCombineSafe(baseDirectory, filePath)
public string PathCombineSafe( 
   string baseDirectory,
   string filePath
)
public:
String^ PathCombineSafe( 
   String^ baseDirectory,
   String^ filePath
) 

Parameters

baseDirectory
The base directory
filePath
The path that comes after the base directory

Return Value

A combined Path
Example
LinkLogic linkLogic = new LinkLogic(); //Trial Mode
LinkLogic linkLogicLicensed = new LinkLogic("place user name here", "place license key here");  //License Mode
 
string url = linkLogic.PathCombineSafe("c:\\", "downloads\\test.txt");
 
Console.WriteLine(url);
Dim linkLogic As New LinkLogic() 'Trial Mode
Dim linkLogicLicensed As New LinkLogic("place user name here", "place license key here") 'License Mode
 
Dim url As String = linkLogic.PathCombineSafe("c:\", "downloads\test.txt")
 
Console.WriteLine(url)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LinkLogic Class
LinkLogic Members