mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
fixed a bunch of things. added basic support for file scanning. logs are now avilable in the UI
This commit is contained in:
@@ -7,11 +7,16 @@ namespace NzbDrone.Core.Providers
|
||||
{
|
||||
#region IDiskProvider Members
|
||||
|
||||
public bool Exists(string path)
|
||||
public bool FolderExists(string path)
|
||||
{
|
||||
return Directory.Exists(path);
|
||||
}
|
||||
|
||||
public bool FileExists(string path)
|
||||
{
|
||||
return File.Exists(path);
|
||||
}
|
||||
|
||||
public string[] GetDirectories(string path)
|
||||
{
|
||||
return Directory.GetDirectories(path);
|
||||
@@ -22,18 +27,16 @@ namespace NzbDrone.Core.Providers
|
||||
return Directory.GetFiles(path, pattern, searchOption);
|
||||
}
|
||||
|
||||
public long GetSize(string path)
|
||||
{
|
||||
return new FileInfo(path).Length;
|
||||
}
|
||||
|
||||
public String CreateDirectory(string path)
|
||||
{
|
||||
return Directory.CreateDirectory(path).FullName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static string CleanPath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
throw new ArgumentException("Path can not be null or empty");
|
||||
return path.ToLower().Trim('/', '\\', ' ');
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user