public override FileSystem.File GetFile(string VirtualPath)
{
VirtualPath = CleanVirtualPath(VirtualPath);
var aPath = VirtualPathToUNCPath(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 = Guid.NewGuid().ToString(),
LastAccessTime = sysFile.LastAccessTime,
ParentDirectory = GetDirectory(VirtualPath.Substring(0, VirtualPath.LastIndexOf("/"))),
FilePath = VirtualPath,
FileSize = sysFile.Length,
};
return file;
}