mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
File Browser
New: File Browser to navigate to folders when choosing paths
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.AccessControl;
|
||||
@@ -21,7 +22,6 @@ namespace NzbDrone.Common.Disk
|
||||
public abstract void SetPermissions(string path, string mask, string user, string group);
|
||||
public abstract long? GetTotalSize(string path);
|
||||
|
||||
|
||||
public DateTime FolderGetCreationTime(string path)
|
||||
{
|
||||
CheckFolderExists(path);
|
||||
@@ -430,5 +430,23 @@ namespace NzbDrone.Common.Disk
|
||||
|
||||
return new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
}
|
||||
|
||||
public List<DirectoryInfo> GetDirectoryInfos(string path)
|
||||
{
|
||||
Ensure.That(path, () => path).IsValidPath();
|
||||
|
||||
var di = new DirectoryInfo(path);
|
||||
|
||||
return di.GetDirectories().ToList();
|
||||
}
|
||||
|
||||
public List<FileInfo> GetFileInfos(string path)
|
||||
{
|
||||
Ensure.That(path, () => path).IsValidPath();
|
||||
|
||||
var di = new DirectoryInfo(path);
|
||||
|
||||
return di.GetFiles().ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user