BlogEngine.Core.Providers.DbFileSystemProvider.GetFile C# (CSharp) Method

GetFile() public method

gets a specific file by virtual path
public GetFile ( string VirtualPath ) : FileSystem.File
VirtualPath string the virtual path of the file
return FileSystem.File
        public override FileSystem.File GetFile(string VirtualPath)
        {
            var db = new FileSystem.FileStoreDb(this.connectionString);
            var file = db.FileStoreFiles.FirstOrDefault(x => x.FullPath == VirtualPath.VirtualPathToDbPath() && x.FileStoreDirectory.BlogID == Blog.CurrentInstance.Id).CopyToFile();
            db.Dispose();
            return file;
        }