mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
failed attempt to write a test for Series Controller
This commit is contained in:
parent
020a7462c0
commit
babe2735ee
10 changed files with 105 additions and 23 deletions
25
NzbDrone.Core/Helpers/Disk.cs
Normal file
25
NzbDrone.Core/Helpers/Disk.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.Helpers
|
||||
{
|
||||
|
||||
static class Disk
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the path. making it a uniform path.
|
||||
/// this will normalize all different presentations of a single folder.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>Cleaned Path</returns>
|
||||
public static string CleanPath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentException("Path can not be null or empty");
|
||||
return path.ToLower().Trim('/', '\\', ' ');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue