FilesGetRelativePath(String, String) Method
Gets the relative path to target from the baseDirectory.
This overload performs a case insensitive comparison.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
public static string GetRelativePath(
string target,
string baseDirectory
)
Public Shared Function GetRelativePath (
target As String,
baseDirectory As String
) As String
public:
static String^ GetRelativePath(
String^ target,
String^ baseDirectory
)
static member GetRelativePath :
target : string *
baseDirectory : string -> string
- target String
- The target file or directory name. Can be either an absolute path or a relative one to current directory.
- baseDirectory String
- The base directory to which the relative target path should be determined.
StringThe relative path of
target from
baseDirectory, or the absolute path of
target if there is no relative path between them.