Returns a relative path string from a full path based on a base path provided.

public static string GetRelativePath(string fullPath,
	string basePath)

Return Value

String of the relative path.

Examples of returned values: test.txt, ..\test.txt, ......\test.txt, ., .., subdir\test.txt


The path to convert. Can be either a file or a directory

The base path on which relative processing is based. Should be a directory.

See also:

Class FileUtils

© West Wind Technologies, 2019 • Updated: 06/23/19
Comment or report problem with topic