aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-26 22:08:04 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-28 22:09:56 +0100
commitd7c6d1625043fb69a90e7ccb24fc31a912c8a2d3 (patch)
tree516b929007f1539c1e1a8ad8cce3f1775c127380 /Emby.Server.Implementations/Library/LibraryManager.cs
parent3a831994f69bbde699a1a725b57d8fd1d7e98641 (diff)
Unwrapped CreateDirectory and DeleteDirectory
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 89881d730..7b6372fe8 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -375,7 +375,7 @@ namespace Emby.Server.Implementations.Library
try
{
- _fileSystem.DeleteDirectory(metadataPath, true);
+ Directory.Delete(metadataPath, true);
}
catch (IOException)
{
@@ -402,11 +402,11 @@ namespace Emby.Server.Implementations.Library
_logger.LogDebug("Deleting path {path}", fileSystemInfo.FullName);
if (fileSystemInfo.IsDirectory)
{
- _fileSystem.DeleteDirectory(fileSystemInfo.FullName, true);
+ Directory.Delete(fileSystemInfo.FullName, true);
}
else
{
- _fileSystem.DeleteFile(fileSystemInfo.FullName);
+ File.Delete(fileSystemInfo.FullName);
}
}
catch (IOException)
@@ -720,7 +720,7 @@ namespace Emby.Server.Implementations.Library
{
var rootFolderPath = ConfigurationManager.ApplicationPaths.RootFolderPath;
- _fileSystem.CreateDirectory(rootFolderPath);
+ Directory.CreateDirectory(rootFolderPath);
var rootFolder = GetItemById(GetNewItemId(rootFolderPath, typeof(AggregateFolder))) as AggregateFolder ?? ((Folder)ResolvePath(_fileSystem.GetDirectoryInfo(rootFolderPath))).DeepCopy<Folder, AggregateFolder>();
@@ -734,7 +734,7 @@ namespace Emby.Server.Implementations.Library
// Add in the plug-in folders
var path = Path.Combine(ConfigurationManager.ApplicationPaths.DataPath, "playlists");
- _fileSystem.CreateDirectory(path);
+ Directory.CreateDirectory(path);
Folder folder = new PlaylistsFolder
{
@@ -785,7 +785,7 @@ namespace Emby.Server.Implementations.Library
{
var userRootPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
- _fileSystem.CreateDirectory(userRootPath);
+ Directory.CreateDirectory(userRootPath);
var tmpItem = GetItemById(GetNewItemId(userRootPath, typeof(UserRootFolder))) as UserRootFolder;
@@ -999,7 +999,7 @@ namespace Emby.Server.Implementations.Library
public Task ValidatePeople(CancellationToken cancellationToken, IProgress<double> progress)
{
// Ensure the location is available.
- _fileSystem.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);
+ Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath);
return new PeopleValidator(this, _logger, ConfigurationManager, _fileSystem).ValidatePeople(cancellationToken, progress);
}
@@ -2146,7 +2146,7 @@ namespace Emby.Server.Implementations.Library
if (item == null || !string.Equals(item.Path, path, StringComparison.OrdinalIgnoreCase))
{
- _fileSystem.CreateDirectory(path);
+ Directory.CreateDirectory(path);
item = new UserView
{
@@ -2191,7 +2191,7 @@ namespace Emby.Server.Implementations.Library
if (item == null)
{
- _fileSystem.CreateDirectory(path);
+ Directory.CreateDirectory(path);
item = new UserView
{
@@ -2256,7 +2256,7 @@ namespace Emby.Server.Implementations.Library
if (item == null)
{
- _fileSystem.CreateDirectory(path);
+ Directory.CreateDirectory(path);
item = new UserView
{
@@ -2324,7 +2324,7 @@ namespace Emby.Server.Implementations.Library
if (item == null)
{
- _fileSystem.CreateDirectory(path);
+ Directory.CreateDirectory(path);
item = new UserView
{
@@ -2883,7 +2883,7 @@ namespace Emby.Server.Implementations.Library
try
{
- _fileSystem.CreateDirectory(virtualFolderPath);
+ Directory.CreateDirectory(virtualFolderPath);
if (!string.IsNullOrEmpty(collectionType))
{
@@ -3082,7 +3082,7 @@ namespace Emby.Server.Implementations.Library
try
{
- _fileSystem.DeleteDirectory(path, true);
+ Directory.Delete(path, true);
}
finally
{