mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Unwrapped CreateDirectory and DeleteDirectory
This commit is contained in:
parent
3a831994f6
commit
d7c6d16250
58 changed files with 102 additions and 101 deletions
|
@ -379,7 +379,7 @@ namespace Emby.Dlna
|
|||
|
||||
if (!fileInfo.Exists || fileInfo.Length != stream.Length)
|
||||
{
|
||||
_fileSystem.CreateDirectory(systemProfilesPath);
|
||||
Directory.CreateDirectory(systemProfilesPath);
|
||||
|
||||
using (var fileStream = _fileSystem.GetFileStream(path, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
|
||||
{
|
||||
|
@ -390,7 +390,7 @@ namespace Emby.Dlna
|
|||
}
|
||||
|
||||
// Not necessary, but just to make it easy to find
|
||||
_fileSystem.CreateDirectory(UserProfilesPath);
|
||||
Directory.CreateDirectory(UserProfilesPath);
|
||||
}
|
||||
|
||||
public void DeleteProfile(string id)
|
||||
|
|
|
@ -631,7 +631,7 @@ namespace Emby.Drawing
|
|||
return (enhancedImagePath, treatmentRequiresTransparency);
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(enhancedImagePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(enhancedImagePath));
|
||||
|
||||
await ExecuteImageEnhancers(supportedEnhancers, originalImagePath, enhancedImagePath, item, imageType, imageIndex).ConfigureAwait(false);
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ namespace IsoMounter
|
|||
|
||||
try
|
||||
{
|
||||
FileSystem.CreateDirectory(mountPoint);
|
||||
Directory.CreateDirectory(mountPoint);
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ namespace IsoMounter
|
|||
|
||||
try
|
||||
{
|
||||
FileSystem.DeleteDirectory(mountPoint, false);
|
||||
Directory.Delete(mountPoint, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -455,7 +455,7 @@ namespace IsoMounter
|
|||
|
||||
try
|
||||
{
|
||||
FileSystem.DeleteDirectory(mount.MountedPath, false);
|
||||
Directory.Delete(mount.MountedPath, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace Emby.Server.Implementations.AppBase
|
|||
Logger.LogInformation("Saving system configuration");
|
||||
var path = CommonApplicationPaths.SystemConfigurationFilePath;
|
||||
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_configurationSyncLock)
|
||||
{
|
||||
|
@ -294,7 +294,7 @@ namespace Emby.Server.Implementations.AppBase
|
|||
_configurations.AddOrUpdate(key, configuration, (k, v) => configuration);
|
||||
|
||||
var path = GetConfigurationFile(key);
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_configurationSyncLock)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.AppBase
|
|||
// If the file didn't exist before, or if something has changed, re-save
|
||||
if (buffer == null || !buffer.SequenceEqual(newBytes))
|
||||
{
|
||||
fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
// Save it after load in case we got new items
|
||||
fileSystem.WriteAllBytes(path, newBytes);
|
||||
|
|
|
@ -355,7 +355,7 @@ namespace Emby.Server.Implementations.Channels
|
|||
return;
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
_jsonSerializer.SerializeToFile(mediaSources, path);
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ namespace Emby.Server.Implementations.Channels
|
|||
{
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
_jsonSerializer.SerializeToFile(result, path);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace Emby.Server.Implementations.Collections
|
|||
return null;
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(path);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var libraryOptions = new LibraryOptions
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ namespace Emby.Server.Implementations.Collections
|
|||
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(path);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var collection = new BoxSet
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Devices
|
|||
{
|
||||
var path = CachePath;
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_syncLock)
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace Emby.Server.Implementations.Devices
|
|||
public void SaveCapabilities(string deviceId, ClientCapabilities capabilities)
|
||||
{
|
||||
var path = Path.Combine(GetDevicePath(deviceId), "capabilities.json");
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_capabilitiesSyncLock)
|
||||
{
|
||||
|
@ -239,7 +239,7 @@ namespace Emby.Server.Implementations.Devices
|
|||
path = Path.Combine(path, file.Name);
|
||||
path = Path.ChangeExtension(path, MimeTypes.ToExtension(file.MimeType) ?? "jpg");
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
await EnsureLibraryFolder(uploadPathInfo.Item2, uploadPathInfo.Item3).ConfigureAwait(false);
|
||||
|
||||
|
@ -275,7 +275,7 @@ namespace Emby.Server.Implementations.Devices
|
|||
private void AddCameraUpload(string deviceId, LocalFileInfo file)
|
||||
{
|
||||
var path = Path.Combine(GetDevicePath(deviceId), "camerauploads.json");
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_cameraUploadSyncLock)
|
||||
{
|
||||
|
@ -317,7 +317,7 @@ namespace Emby.Server.Implementations.Devices
|
|||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(path);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var libraryOptions = new LibraryOptions
|
||||
{
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace Emby.Server.Implementations.FFMpeg
|
|||
Version = version
|
||||
};
|
||||
|
||||
_fileSystem.CreateDirectory(versionedDirectoryPath);
|
||||
Directory.CreateDirectory(versionedDirectoryPath);
|
||||
|
||||
var excludeFromDeletions = new List<string> { versionedDirectoryPath };
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
|
||||
private async Task CacheResponse(HttpResponseInfo response, string responseCachePath)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(responseCachePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(responseCachePath));
|
||||
|
||||
using (var fileStream = _fileSystem.GetFileStream(responseCachePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.None, true))
|
||||
{
|
||||
|
@ -513,7 +513,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
{
|
||||
ValidateParams(options);
|
||||
|
||||
_fileSystem.CreateDirectory(_appPaths.TempDirectory);
|
||||
Directory.CreateDirectory(_appPaths.TempDirectory);
|
||||
|
||||
var tempFile = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid() + ".tmp");
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace Emby.Server.Implementations.Images
|
|||
CancellationToken cancellationToken)
|
||||
{
|
||||
var outputPathWithoutExtension = Path.Combine(ApplicationPaths.TempDirectory, Guid.NewGuid().ToString("N"));
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(outputPathWithoutExtension));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPathWithoutExtension));
|
||||
string outputPath = CreateImage(item, itemsWithImages, outputPathWithoutExtension, imageType, 0);
|
||||
|
||||
if (string.IsNullOrEmpty(outputPath))
|
||||
|
@ -165,7 +165,7 @@ namespace Emby.Server.Implementations.Images
|
|||
|
||||
private string CreateCollage(BaseItem primaryItem, List<BaseItem> items, string outputPath, int width, int height)
|
||||
{
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
|
||||
var options = new ImageCollageOptions
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -670,7 +670,7 @@ namespace Emby.Server.Implementations.Library
|
|||
|
||||
if (cacheFilePath != null)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(cacheFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(cacheFilePath));
|
||||
_jsonSerializer.SerializeToFile(mediaInfo, cacheFilePath);
|
||||
|
||||
//_logger.LogDebug("Saved media info to {0}", cacheFilePath);
|
||||
|
|
|
@ -1080,7 +1080,7 @@ namespace Emby.Server.Implementations.Library
|
|||
|
||||
var path = GetPolicyFilePath(user);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_policySyncLock)
|
||||
{
|
||||
|
@ -1176,7 +1176,7 @@ namespace Emby.Server.Implementations.Library
|
|||
config = _jsonSerializer.DeserializeFromString<UserConfiguration>(json);
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_configSyncLock)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
|
||||
private async Task RecordFromDirectStreamProvider(IDirectStreamProvider directStreamProvider, string targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(targetFile));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(targetFile));
|
||||
|
||||
using (var output = _fileSystem.GetFileStream(targetFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
{
|
||||
_logger.LogInformation("Opened recording stream from tuner provider");
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(targetFile));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(targetFile));
|
||||
|
||||
using (var output = _fileSystem.GetFileStream(targetFile, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
private Task RecordFromFile(MediaSourceInfo mediaSource, string inputFile, string targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken)
|
||||
{
|
||||
_targetPath = targetFile;
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(targetFile));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(targetFile));
|
||||
|
||||
var process = _processFactory.Create(new ProcessOptions
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
_logger.LogInformation(commandLineLogMessage);
|
||||
|
||||
var logFilePath = Path.Combine(_appPaths.LogDirectoryPath, "record-transcode-" + Guid.NewGuid() + ".txt");
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
|
||||
// FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory.
|
||||
_logFileStream = _fileSystem.GetFileStream(logFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true);
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||
}
|
||||
|
||||
var file = _dataPath + ".json";
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(file));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(file));
|
||||
|
||||
lock (_fileDataLock)
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings
|
|||
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(cacheFile));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(cacheFile));
|
||||
|
||||
_fileSystem.CopyFile(tempFile, cacheFile, true);
|
||||
|
||||
|
@ -125,7 +125,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings
|
|||
using (var stream = _fileSystem.OpenRead(file))
|
||||
{
|
||||
string tempFolder = Path.Combine(_config.ApplicationPaths.TempDirectory, Guid.NewGuid().ToString());
|
||||
_fileSystem.CreateDirectory(tempFolder);
|
||||
Directory.CreateDirectory(tempFolder);
|
||||
|
||||
_zipClient.ExtractFirstFileFromGz(stream, tempFolder, "data.xml");
|
||||
|
||||
|
@ -138,7 +138,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings
|
|||
using (var stream = _fileSystem.OpenRead(file))
|
||||
{
|
||||
string tempFolder = Path.Combine(_config.ApplicationPaths.TempDirectory, Guid.NewGuid().ToString());
|
||||
_fileSystem.CreateDirectory(tempFolder);
|
||||
Directory.CreateDirectory(tempFolder);
|
||||
|
||||
_zipClient.ExtractAllFromGz(stream, tempFolder, true);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|||
{
|
||||
try
|
||||
{
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(channelCacheFile));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(channelCacheFile));
|
||||
JsonSerializer.SerializeToFile(channels, channelCacheFile);
|
||||
}
|
||||
catch (IOException)
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
|||
var uri = new Uri(mediaSource.Path);
|
||||
var localPort = _networkManager.GetRandomUnusedUdpPort();
|
||||
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(TempFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(TempFilePath));
|
||||
|
||||
Logger.LogInformation("Opening HDHR UDP Live stream from {host}", uri.Host);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|||
|
||||
var url = mediaSource.Path;
|
||||
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(TempFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(TempFilePath));
|
||||
|
||||
var typeName = GetType().Name;
|
||||
Logger.LogInformation("Opening " + typeName + " Live stream from {0}", url);
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Emby.Server.Implementations.Localization
|
|||
|
||||
var localizationPath = LocalizationPath;
|
||||
|
||||
_fileSystem.CreateDirectory(localizationPath);
|
||||
Directory.CreateDirectory(localizationPath);
|
||||
|
||||
var existingFiles = GetRatingsFiles(localizationPath)
|
||||
.Select(Path.GetFileName)
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace Emby.Server.Implementations.MediaEncoder
|
|||
|
||||
var inputPath = MediaEncoderHelpers.GetInputArgument(_fileSystem, video.Path, protocol, null, Array.Empty<string>());
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
var container = video.Container;
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace Emby.Server.Implementations.Playlists
|
|||
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(path);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var playlist = new Playlist
|
||||
{
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|||
|
||||
var parentPath = Path.GetDirectoryName(failHistoryPath);
|
||||
|
||||
_fileSystem.CreateDirectory(parentPath);
|
||||
Directory.CreateDirectory(parentPath);
|
||||
|
||||
_fileSystem.WriteAllText(failHistoryPath, string.Join("|", previouslyFailedImages.ToArray()));
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|||
_lastExecutionResult = value;
|
||||
|
||||
var path = GetHistoryFilePath();
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
lock (_lastExecutionResultSyncLock)
|
||||
{
|
||||
|
@ -565,7 +565,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
|||
{
|
||||
var path = GetConfigurationFilePath();
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
JsonSerializer.SerializeToFile(triggers, path);
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
|||
{
|
||||
try
|
||||
{
|
||||
_fileSystem.DeleteDirectory(directory, false);
|
||||
Directory.Delete(directory, false);
|
||||
}
|
||||
catch (UnauthorizedAccessException ex)
|
||||
{
|
||||
|
|
|
@ -570,7 +570,7 @@ namespace Emby.Server.Implementations.Updates
|
|||
// Success - move it to the real target
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(target));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(target));
|
||||
_fileSystem.CopyFile(tempFile, target, true);
|
||||
//If it is an archive - write out a version file so we know what it is
|
||||
if (isArchive)
|
||||
|
|
|
@ -219,7 +219,7 @@ namespace Jellyfin.Drawing.Skia
|
|||
|
||||
var tempPath = Path.Combine(_appPaths.TempDirectory, Guid.NewGuid() + Path.GetExtension(path) ?? string.Empty);
|
||||
|
||||
fileSystem.CreateDirectory(Path.GetDirectoryName(tempPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
|
||||
fileSystem.CopyFile(path, tempPath, true);
|
||||
|
||||
return tempPath;
|
||||
|
@ -532,7 +532,7 @@ namespace Jellyfin.Drawing.Skia
|
|||
// If all we're doing is resizing then we can stop now
|
||||
if (!hasBackgroundColor && !hasForegroundColor && blur == 0 && !hasIndicator)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
using (var outputStream = new SKFileWStream(outputPath))
|
||||
using (var pixmap = new SKPixmap(new SKImageInfo(width, height), resizedBitmap.GetPixels()))
|
||||
{
|
||||
|
@ -584,7 +584,7 @@ namespace Jellyfin.Drawing.Skia
|
|||
DrawIndicator(canvas, width, height, options);
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
using (var outputStream = new SKFileWStream(outputPath))
|
||||
{
|
||||
using (var pixmap = new SKPixmap(new SKImageInfo(width, height), saveBitmap.GetPixels()))
|
||||
|
|
|
@ -264,7 +264,7 @@ namespace MediaBrowser.Api.Images
|
|||
|
||||
var fullCachePath = GetFullCachePath(urlHash + "." + ext);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(fullCachePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath));
|
||||
using (var stream = result.Content)
|
||||
{
|
||||
using (var filestream = _fileSystem.GetFileStream(fullCachePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
|
||||
|
@ -273,7 +273,7 @@ namespace MediaBrowser.Api.Images
|
|||
}
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
|
||||
_fileSystem.WriteAllText(pointerCachePath, fullCachePath);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ namespace MediaBrowser.Api
|
|||
|
||||
var fullCachePath = GetFullCachePath(urlHash + "." + ext);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(fullCachePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath));
|
||||
using (var stream = result.Content)
|
||||
{
|
||||
using (var filestream = _fileSystem.GetFileStream(fullCachePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
|
||||
|
@ -314,7 +314,7 @@ namespace MediaBrowser.Api
|
|||
}
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath));
|
||||
_fileSystem.WriteAllText(pointerCachePath, fullCachePath);
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace MediaBrowser.Api.Playback
|
|||
CancellationTokenSource cancellationTokenSource,
|
||||
string workingDirectory = null)
|
||||
{
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
|
||||
await AcquireResources(state, cancellationTokenSource).ConfigureAwait(false);
|
||||
|
||||
|
@ -258,7 +258,7 @@ namespace MediaBrowser.Api.Playback
|
|||
}
|
||||
|
||||
var logFilePath = Path.Combine(ServerConfigurationManager.ApplicationPaths.LogDirectoryPath, logFilePrefix + "-" + Guid.NewGuid() + ".txt");
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
|
||||
// FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory.
|
||||
state.LogFileStream = FileSystem.GetFileStream(logFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Library;
|
||||
|
@ -169,7 +170,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
// Exceptions will be thrown if these paths already exist
|
||||
if (FileSystem.DirectoryExists(newConfigDirectory))
|
||||
{
|
||||
FileSystem.DeleteDirectory(newConfigDirectory, true);
|
||||
Directory.Delete(newConfigDirectory, true);
|
||||
}
|
||||
|
||||
if (FileSystem.DirectoryExists(oldConfigurationDirectory))
|
||||
|
@ -178,7 +179,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
}
|
||||
else
|
||||
{
|
||||
FileSystem.CreateDirectory(newConfigDirectory);
|
||||
Directory.CreateDirectory(newConfigDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace MediaBrowser.LocalMetadata.Savers
|
|||
|
||||
private void SaveToFile(Stream stream, string path)
|
||||
{
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
// On Windows, savint the file will fail if the file is hidden or readonly
|
||||
FileSystem.SetAttributes(path, false, false);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
.CreateJob(options, EncodingHelper, IsVideoEncoder, progress, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
encodingJob.OutputFilePath = GetOutputFilePath(encodingJob);
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(encodingJob.OutputFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(encodingJob.OutputFilePath));
|
||||
|
||||
encodingJob.ReadInputAtNativeFramerate = options.ReadInputAtNativeFramerate;
|
||||
|
||||
|
@ -105,7 +105,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
Logger.LogInformation(commandLineLogMessage);
|
||||
|
||||
var logFilePath = Path.Combine(ConfigurationManager.CommonApplicationPaths.LogDirectoryPath, "transcode-" + Guid.NewGuid() + ".txt");
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(logFilePath));
|
||||
|
||||
// FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory.
|
||||
encodingJob.LogFileStream = FileSystem.GetFileStream(logFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true);
|
||||
|
|
|
@ -608,7 +608,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
}
|
||||
|
||||
var tempExtractPath = Path.Combine(ConfigurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + ".jpg");
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(tempExtractPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(tempExtractPath));
|
||||
|
||||
// apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600.
|
||||
// This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar
|
||||
|
@ -770,7 +770,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
vf += string.Format(",scale=min(iw\\,{0}):trunc(ow/dar/2)*2", maxWidthParam);
|
||||
}
|
||||
|
||||
FileSystem.CreateDirectory(targetDirectory);
|
||||
Directory.CreateDirectory(targetDirectory);
|
||||
var outputPath = Path.Combine(targetDirectory, filenamePrefix + "%05d.jpg");
|
||||
|
||||
var args = string.Format("-i {0} -threads 0 -v quiet -vf \"{2}\" -f image2 \"{1}\"", inputArgument, outputPath, vf);
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||
throw new ArgumentNullException(nameof(outputPath));
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
|
||||
var encodingParam = await GetSubtitleFileCharacterSet(inputPath, language, inputProtocol, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
|
@ -565,7 +565,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||
throw new ArgumentNullException(nameof(outputPath));
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
||||
|
||||
var processArgs = string.Format("-i {0} -map 0:{1} -an -vn -c:s {2} \"{3}\"", inputPath,
|
||||
subtitleStreamIndex, outputCodec, outputPath);
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace MediaBrowser.Providers.BoxSets
|
|||
|
||||
var dataFilePath = GetDataFilePath(_config.ApplicationPaths, tmdbId, preferredMetadataLanguage);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
|
||||
_json.SerializeToFile(mainResult, dataFilePath);
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
_libraryMonitor.ReportFileSystemChangeBeginning(path);
|
||||
_libraryMonitor.ReportFileSystemChangeBeginning(parentFolder);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
_fileSystem.SetAttributes(path, false, false);
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
|
||||
if (!_fileSystem.FileExists(path))
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
var imageStream = imageStreams.FirstOrDefault(i => (i.Comment ?? string.Empty).IndexOf("front", StringComparison.OrdinalIgnoreCase) != -1) ??
|
||||
imageStreams.FirstOrDefault(i => (i.Comment ?? string.Empty).IndexOf("cover", StringComparison.OrdinalIgnoreCase) != -1) ??
|
||||
|
|
|
@ -254,7 +254,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
|
||||
var path = GetFanartJsonPath(id);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
tmdbId = movieInfo.id.ToString(_usCulture);
|
||||
|
||||
dataFilePath = MovieDbProvider.Current.GetDataFilePath(tmdbId, language);
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
_jsonSerializer.SerializeToFile(movieInfo, dataFilePath);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
|
||||
var dataFilePath = GetDataFilePath(id, preferredMetadataLanguage);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
|
||||
_jsonSerializer.SerializeToFile(mainResult, dataFilePath);
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
var path = GetAlbumInfoPath(_config.ApplicationPaths, musicBrainzReleaseGroupId);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
using (var httpResponse = await _httpClient.SendAsync(new HttpRequestOptions
|
||||
{
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace MediaBrowser.Providers.Music
|
|||
{
|
||||
using (var response = httpResponse.Content)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
using (var xmlFileStream = _fileSystem.GetFileStream(path, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
|
||||
{
|
||||
|
|
|
@ -233,7 +233,7 @@ namespace MediaBrowser.Providers.Music
|
|||
|
||||
var jsonPath = GetArtistJsonPath(_config.ApplicationPaths, musicBrainzId);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(jsonPath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(jsonPath));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -294,7 +294,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||
using (var stream = response.Content)
|
||||
{
|
||||
var rootObject = await _jsonSerializer.DeserializeFromStreamAsync<RootObject>(stream).ConfigureAwait(false);
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_jsonSerializer.SerializeToFile(rootObject, path);
|
||||
}
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||
using (var stream = response.Content)
|
||||
{
|
||||
var rootObject = await _jsonSerializer.DeserializeFromStreamAsync<SeasonRootObject>(stream).ConfigureAwait(false);
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_jsonSerializer.SerializeToFile(rootObject, path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ namespace MediaBrowser.Providers.People
|
|||
{
|
||||
using (var json = response.Content)
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
|
||||
using (var fs = _fileSystem.GetFileStream(dataFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
|
||||
{
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace MediaBrowser.Providers.Studios
|
|||
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
fileSystem.CreateDirectory(Path.GetDirectoryName(file));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(file));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -217,7 +217,7 @@ namespace MediaBrowser.Providers.Subtitles
|
|||
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(savePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(savePath));
|
||||
|
||||
using (var fs = _fileSystem.GetFileStream(savePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, true))
|
||||
{
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
var path = GetFanartJsonPath(tvdbId);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
var dataFilePath = GetDataFilePath(id, seasonNumber, episodeNumber, preferredMetadataLanguage);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
_jsonSerializer.SerializeToFile(mainResult, dataFilePath);
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
var dataFilePath = GetDataFilePath(id, seasonNumber, preferredMetadataLanguage);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
_jsonSerializer.SerializeToFile(mainResult, dataFilePath);
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace MediaBrowser.Providers.TV
|
|||
tmdbId = seriesInfo.id.ToString(_usCulture);
|
||||
|
||||
string dataFilePath = GetDataFilePath(tmdbId, language);
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
_jsonSerializer.SerializeToFile(seriesInfo, dataFilePath);
|
||||
|
||||
await EnsureSeriesInfo(tmdbId, language, cancellationToken).ConfigureAwait(false);
|
||||
|
@ -351,7 +351,7 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
var dataFilePath = GetDataFilePath(id, preferredMetadataLanguage);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(dataFilePath));
|
||||
|
||||
_jsonSerializer.SerializeToFile(mainResult, dataFilePath);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace MediaBrowser.Providers.TV
|
|||
{
|
||||
var path = TvdbSeriesProvider.GetSeriesDataPath(_config.CommonApplicationPaths);
|
||||
|
||||
_fileSystem.CreateDirectory(path);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var timestampFile = Path.Combine(path, "time.txt");
|
||||
|
||||
|
@ -390,7 +390,7 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
seriesDataPath = Path.Combine(seriesDataPath, id);
|
||||
|
||||
_fileSystem.CreateDirectory(seriesDataPath);
|
||||
Directory.CreateDirectory(seriesDataPath);
|
||||
|
||||
return TvdbSeriesProvider.Current.DownloadSeriesZip(id, MetadataProviders.Tvdb.ToString(), null, null, seriesDataPath, lastTvDbUpdateTime, preferredMetadataLanguage, cancellationToken);
|
||||
}
|
||||
|
|
|
@ -390,7 +390,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
{
|
||||
try
|
||||
{
|
||||
_fileSystem.DeleteDirectory(targetPath, true);
|
||||
Directory.Delete(targetPath, true);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
|
@ -435,11 +435,11 @@ namespace MediaBrowser.WebDashboard.Api
|
|||
|
||||
private void CopyDirectory(string source, string destination)
|
||||
{
|
||||
_fileSystem.CreateDirectory(destination);
|
||||
Directory.CreateDirectory(destination);
|
||||
|
||||
//Now Create all of the directories
|
||||
foreach (var dirPath in _fileSystem.GetDirectories(source, true))
|
||||
_fileSystem.CreateDirectory(dirPath.FullName.Replace(source, destination));
|
||||
Directory.CreateDirectory(dirPath.FullName.Replace(source, destination));
|
||||
|
||||
//Copy all the files & Replaces any files with the same name
|
||||
foreach (var newPath in _fileSystem.GetFiles(source, true))
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
|
||||
private void SaveToFile(Stream stream, string path)
|
||||
{
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
// On Windows, savint the file will fail if the file is hidden or readonly
|
||||
FileSystem.SetAttributes(path, false, false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue