aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/EnvironmentService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/EnvironmentService.cs')
-rw-r--r--MediaBrowser.Api/EnvironmentService.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs
index 0fc20749f..bdd7a8f8f 100644
--- a/MediaBrowser.Api/EnvironmentService.cs
+++ b/MediaBrowser.Api/EnvironmentService.cs
@@ -137,14 +137,14 @@ namespace MediaBrowser.Api
{
if (request.IsFile.Value)
{
- if (!_fileSystem.FileExists(request.Path))
+ if (!File.Exists(request.Path))
{
throw new FileNotFoundException("File not found", request.Path);
}
}
else
{
- if (!_fileSystem.DirectoryExists(request.Path))
+ if (!Directory.Exists(request.Path))
{
throw new FileNotFoundException("File not found", request.Path);
}
@@ -153,7 +153,7 @@ namespace MediaBrowser.Api
else
{
- if (!_fileSystem.FileExists(request.Path) && !_fileSystem.DirectoryExists(request.Path))
+ if (!File.Exists(request.Path) && !Directory.Exists(request.Path))
{
throw new FileNotFoundException("Path not found", request.Path);
}
@@ -169,7 +169,7 @@ namespace MediaBrowser.Api
{
var file = Path.Combine(path, Guid.NewGuid().ToString());
- _fileSystem.WriteAllText(file, string.Empty);
+ File.WriteAllText(file, string.Empty);
_fileSystem.DeleteFile(file);
}
@@ -303,7 +303,7 @@ namespace MediaBrowser.Api
public object Get(GetParentPath request)
{
- var parent = _fileSystem.GetDirectoryName(request.Path);
+ var parent = Path.GetDirectoryName(request.Path);
if (string.IsNullOrEmpty(parent))
{