private GetRelativePathsToRoot ( string virtualPath ) : IEnumerable |
||
virtualPath | string | |
return | IEnumerable |
private IEnumerable<string> GetRelativePathsToRoot(string virtualPath)
{
var physicalPath = Server.MapPath(virtualPath);
var absolutePaths = Directory.GetFiles(physicalPath, "*.*", SearchOption.AllDirectories);
return absolutePaths.Select(
x => Url.Content(virtualPath + x.Replace(physicalPath, ""))
);
}
}