FilesGetRelativePath(String, String, Boolean) Method

Gets the relative path to target from the baseDirectory.


Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
public static string GetRelativePath(
	string target,
	string baseDirectory,
	bool isCaseSensitive


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.
isCaseSensitive  Boolean
to perform a case-sensitive comparison; to perform a case-insensitive comparison.

Return Value

The relative path of target from baseDirectory, or the absolute path of target if there is no relative path between them.


ArgumentNullExceptiontarget or baseDirectory is .

See Also