public override FileSystem.File GetFile(string VirtualPath)
{
VirtualPath = RelativeFilePath(VirtualPath);
var aPath = BlogAbsolutePath(VirtualPath);
var sysFile = new FileInfo(aPath);
if (!sysFile.Exists)
throw new FileNotFoundException("The file at " + VirtualPath + " was not found.");
var file = new FileSystem.File
{
FullPath = VirtualPath,
Name = sysFile.Name,
DateModified = sysFile.LastWriteTime,
DateCreated = sysFile.CreationTime,
Id = VirtualPath.Replace(Blog.CurrentInstance.RootFileStore.FullPath, ""),
LastAccessTime = sysFile.LastAccessTime,
ParentDirectory = GetDirectory(VirtualPath.Substring(0, VirtualPath.LastIndexOf("/"))),
FilePath = VirtualPath.Replace(Blog.CurrentInstance.RootFileStore.FullPath, ""),
FileSize = sysFile.Length,
};
return file;
}