mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
lots of different things ;)
This commit is contained in:
parent
c42518b34e
commit
4ae268b8e5
71 changed files with 526 additions and 1229 deletions
|
@ -77,6 +77,25 @@ namespace NzbDrone.Common
|
|||
Directory.Move(source, destination);
|
||||
}
|
||||
|
||||
public virtual void CopyDirectory(string source, string target)
|
||||
{
|
||||
Logger.Trace("Copying {0} -> {1}", source, target);
|
||||
|
||||
var sourceFolder = new DirectoryInfo(source);
|
||||
var targetFolder = new DirectoryInfo(target);
|
||||
|
||||
if (!targetFolder.Exists)
|
||||
{
|
||||
targetFolder.Create();
|
||||
}
|
||||
|
||||
foreach (var file in sourceFolder.GetFiles("*.*", SearchOption.AllDirectories))
|
||||
{
|
||||
var destFile = Path.Combine(target, file.Name);
|
||||
file.CopyTo(destFile, true);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void InheritFolderPermissions(string filename)
|
||||
{
|
||||
var fs = File.GetAccessControl(filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue