diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-13 19:07:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-13 19:07:54 -0400 |
| commit | 8cf45a3e4a5345f704f8acef098b173ec1808251 (patch) | |
| tree | 06560c42256b91d02744369b8dc834ade8bc8ffb /MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs | |
| parent | 6cb184fcf8ea7803626e0f3e0a3c7f118e4328e9 (diff) | |
add more methods to IFileSystem
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs index e5cf5856e..79e558794 100644 --- a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs +++ b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs @@ -99,15 +99,15 @@ namespace MediaBrowser.Common.Implementations.Security { try { - contents = _fileSystem.ReadAllLines(licenseFile); + contents = File.ReadAllLines(licenseFile); } catch (DirectoryNotFoundException) { - (_fileSystem.CreateFile(licenseFile)).Close(); + (File.Create(licenseFile)).Close(); } catch (FileNotFoundException) { - (_fileSystem.CreateFile(licenseFile)).Close(); + (File.Create(licenseFile)).Close(); } } if (contents != null && contents.Length > 0) @@ -150,8 +150,8 @@ namespace MediaBrowser.Common.Implementations.Security } var licenseFile = Filename; - _fileSystem.CreateDirectory(Path.GetDirectoryName(licenseFile)); - lock (_fileLock) _fileSystem.WriteAllLines(licenseFile, lines); + Directory.CreateDirectory(Path.GetDirectoryName(licenseFile)); + lock (_fileLock) File.WriteAllLines(licenseFile, lines); } } } |
