aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/IO/FileData.cs
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-20 23:56:28 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-20 23:56:28 -0400
commit9029d939f3a23fc949538e53117fd85051e0ea1d (patch)
tree061293b54dfd904ed9f1315d575f8a32816a8f6d /MediaBrowser.Controller/IO/FileData.cs
parent0a0a4256b307b593b1f0022d217aacb0dd4a840a (diff)
Further reduced disk access in ItemController
Diffstat (limited to 'MediaBrowser.Controller/IO/FileData.cs')
-rw-r--r--MediaBrowser.Controller/IO/FileData.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs
index 843a7e8fe..92b4a6986 100644
--- a/MediaBrowser.Controller/IO/FileData.cs
+++ b/MediaBrowser.Controller/IO/FileData.cs
@@ -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;
+ }
+ }
+ }
+
}