Path
Some path based methods that we need even in the Portable framework which
does not have the System.IO.Path class
namespace NUnit.Framework.Compatibility
{
public static class Path
{
public static readonly char WindowsSeparatorChar = '\\';
public static readonly char AltDirectorySeparatorChar = '/';
public static readonly char VolumeSeparatorChar = ':';
public static string GetFileName(string path)
{
if (path != null) {
int length = path.Length;
for (int num = length - 1; num >= 0; num--) {
char c = path[num];
if (c == WindowsSeparatorChar || c == AltDirectorySeparatorChar || c == VolumeSeparatorChar)
return path.Substring(num + 1, length - num - 1);
}
}
return path;
}
}
}