IdeaBlade DevForce 2010 Help Reference
GetRelativePath Method
See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core Namespace > FileFns Class : GetRelativePath Method



fullPath
Full path
basePath
Base path from which full path will be made relative
Returns a relative path string from a full path.

Syntax

Visual Basic (Declaration) 
Public Shared Function GetRelativePath( _
   ByVal fullPath As String, _
   ByVal basePath As String _
) As String
Visual Basic (Usage)Copy Code
Dim fullPath As String
Dim basePath As String
Dim value As String
 
value = FileFns.GetRelativePath(fullPath, basePath)
C# 
public static string GetRelativePath( 
   string fullPath,
   string basePath
)
C++/CLI 
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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.