Update file and folder handling methods from Radarr (#1051)

* Update file/folder handling methods from Radarr

* fixup!
This commit is contained in:
Qstick
2022-07-02 18:40:00 -05:00
committed by GitHub
parent cac2729230
commit 473405ceeb
17 changed files with 534 additions and 162 deletions
@@ -10,6 +10,16 @@ namespace NzbDrone.Common.Test.DiskTests
public abstract class DiskProviderFixtureBase<TSubject> : TestBase<TSubject>
where TSubject : class, IDiskProvider
{
[Test]
public void writealltext_should_truncate_existing()
{
var file = GetTempFilePath();
Subject.WriteAllText(file, "A pretty long string");
Subject.WriteAllText(file, "A short string");
Subject.ReadAllText(file).Should().Be("A short string");
}
[Test]
[Retry(5)]
public void directory_exist_should_be_able_to_find_existing_folder()