diff options
Diffstat (limited to 'MediaBrowser.Controller/IO/FileData.cs')
| -rw-r--r-- | MediaBrowser.Controller/IO/FileData.cs | 24 |
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;
+ }
+ }
+ }
+
}
|
