diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-31 10:03:23 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-31 10:03:23 -0400 |
| commit | 6c8d9192985036acb3d1fe626ed57980bb862d6a (patch) | |
| tree | 94d59b266b877bf0b073c5e3291cb2822dc055f7 /MediaBrowser.Controller/Entities | |
| parent | 579b507f7fa322fdf8a746b6e787015d0567e2a6 (diff) | |
replace file system calls with IFileSystem when needed
Diffstat (limited to 'MediaBrowser.Controller/Entities')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/User.cs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index f1937a4616..839fe34ffe 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1,4 +1,5 @@ using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.IO; @@ -1737,7 +1738,7 @@ namespace MediaBrowser.Controller.Entities if (locationType == LocationType.Remote || locationType == LocationType.Virtual) { - return File.GetLastWriteTimeUtc(imagePath); + return FileSystem.GetLastWriteTimeUtc(imagePath); } var metaFileEntry = ResolveArgs.GetMetaFileByPath(imagePath); @@ -1754,7 +1755,7 @@ namespace MediaBrowser.Controller.Entities } // See if we can avoid a file system lookup by looking for the file in ResolveArgs - return metaFileEntry == null ? File.GetLastWriteTimeUtc(imagePath) : metaFileEntry.LastWriteTimeUtc; + return metaFileEntry == null ? FileSystem.GetLastWriteTimeUtc(imagePath) : FileSystem.GetLastWriteTimeUtc(metaFileEntry); } } } diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index 9d85399067..06f50e552b 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -165,7 +165,7 @@ namespace MediaBrowser.Controller.Entities // Ensure it's been lazy loaded var config = Configuration; - return File.GetLastWriteTimeUtc(ConfigurationFilePath); + return FileSystem.GetLastWriteTimeUtc(ConfigurationFilePath); } } |
