Added new helper to find the best file size format given a long with file size in bytes.

Added view under system to see which folders have not been processed in dropDir.
This commit is contained in:
Mark McDowall 2011-06-07 23:15:35 -07:00
commit 54e7092e2d
7 changed files with 214 additions and 2 deletions

View file

@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace NzbDrone.Core.Providers.Core
{
@ -56,5 +58,20 @@ namespace NzbDrone.Core.Providers.Core
{
Directory.Delete(path, recursive);
}
public virtual DateTime DirectoryDateCreated(string path)
{
return Directory.GetCreationTime(path);
}
public virtual IEnumerable<FileInfo> GetFileInfos(string path, string pattern, SearchOption searchOption)
{
return new DirectoryInfo(path).GetFiles(pattern, searchOption);
}
public virtual void MoveDirectory(string source, string destination)
{
Directory.Move(source, destination);
}
}
}