Further reduced disk access in ItemController

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-20 23:56:28 -04:00
parent 0a0a4256b3
commit 9029d939f3
17 changed files with 93 additions and 93 deletions

View File

@@ -93,4 +93,28 @@ namespace MediaBrowser.Controller.IO
}
}
public struct LazyFileInfo
{
public string Path { get; set; }
private WIN32_FIND_DATA? _FileInfo { get; set; }
public WIN32_FIND_DATA FileInfo
{
get
{
if (_FileInfo == null)
{
_FileInfo = FileData.GetFileData(Path);
}
return _FileInfo.Value;
}
set
{
_FileInfo = value;
}
}
}
}