Added GetDirectorySize to DiskProvider

Removed search folder from disk provider
This commit is contained in:
kay.one
2011-07-05 00:09:07 -07:00
parent 8b0c8afb81
commit 3dd8e7240e
4 changed files with 11 additions and 30 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
@@ -21,9 +22,14 @@ namespace NzbDrone.Core.Providers.Core
return Directory.GetDirectories(path);
}
public virtual string[] GetFiles(string path, string pattern, SearchOption searchOption)
public virtual string[] GetFiles(string path, SearchOption searchOption)
{
return Directory.GetFiles(path, pattern, searchOption);
return Directory.GetFiles(path, "*.*", searchOption);
}
public virtual long GetDirectorySize(string path)
{
return GetFiles(path, SearchOption.AllDirectories).Sum(e => new FileInfo(e).Length);
}
public virtual long GetSize(string path)