private FileInfo toFile(string path)
{
if (path.StartsWith("~/"))
{
return new FileInfo(Path.Combine(home.FullName, path.Substring(2)));
}
if (Path.IsPathRooted(path))
{
return new FileInfo(path);
}
return new FileInfo(Path.Combine(home.FullName, path));
}