Extra checks for empty strings and non-existing paths, use PhysicalFileSystem

This commit is contained in:
Sebastiaan Janssen
2013-01-03 09:48:29 -01:00
parent 0ca91c9229
commit 4166cd9f5d
2 changed files with 48 additions and 33 deletions

View File

@@ -150,6 +150,11 @@ namespace Umbraco.Core.IO
return File.Exists(GetFullPath(path));
}
public string GetExtension(string path)
{
return Path.GetExtension(GetFullPath(path));
}
public string GetRelativePath(string fullPathOrUrl)
{
var relativePath = fullPathOrUrl