mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Initial Commit
This commit is contained in:
commit
74ac3bb599
106 changed files with 118079 additions and 0 deletions
35
NzbDrone.Core/Controllers/DiskController.cs
Normal file
35
NzbDrone.Core/Controllers/DiskController.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace NzbDrone.Core.Controllers
|
||||
{
|
||||
public class DiskController : IDiskController
|
||||
{
|
||||
#region IDiskController Members
|
||||
|
||||
public bool Exists(string path)
|
||||
{
|
||||
return Directory.Exists(path);
|
||||
}
|
||||
|
||||
public string[] GetDirectories(string path)
|
||||
{
|
||||
return Directory.GetDirectories(path);
|
||||
}
|
||||
|
||||
public String CreateDirectory(string path)
|
||||
{
|
||||
return Directory.CreateDirectory(path).FullName;
|
||||
}
|
||||
|
||||
|
||||
public string CleanPath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentException("Path can not be null or empty");
|
||||
|
||||
return path.ToLower().Trim('/', '\\', ' ');
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue