FileHelper.GetRelativePath Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

GetRelativePath(string, string)

Get the relative path from one file or folder to another.

public static string GetRelativePath(string from, string to)

Parameters

from
string

The directory that defines the start of the relative path.

to
string

The path that defines the endpoint of the relative path.

Returns

string

The relative path from the start directory to the end path or to if the paths are not related.