DevForce Help Reference
GetRelativePath Method


Full path
Base path from which full path will be made relative
Returns a relative path string from a full path.
Syntax
'Declaration
 
Public Shared Function GetRelativePath( _
   ByVal fullPath As String, _
   ByVal basePath As String _
) As String
'Usage
 
Dim fullPath As String
Dim basePath As String
Dim value As String
 
value = FileFns.GetRelativePath(fullPath, basePath)
public static string GetRelativePath( 
   string fullPath,
   string basePath
)

Parameters

fullPath
Full path
basePath
Base path from which full path will be made relative

Return Value

The relative path
Remarks
The path to convert can be either a file or a directory. If path is a directory it's returned without a backslash at the end. Examples of returned values: ".\test.txt", "..\test.txt", "..\..\..\test.txt", ".", "..".
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

FileFns Class
FileFns Members

Send Feedback