mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-27 18:12:34 -04:00
Lots of changes to get code ready to add library.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using API.Interfaces;
|
||||
|
||||
namespace API.Services
|
||||
{
|
||||
public class DirectoryService : IDirectoryService
|
||||
{
|
||||
public IEnumerable<string> ListDirectory(string rootPath)
|
||||
{
|
||||
// TODO: Filter out Hidden and System folders
|
||||
// DirectoryInfo di = new DirectoryInfo(@path);
|
||||
// var dirs = di.GetDirectories()
|
||||
// .Where(dir => (dir.Attributes & FileAttributes.Hidden & FileAttributes.System) == 0).ToImmutableList();
|
||||
//
|
||||
|
||||
return Directory.GetDirectories(@rootPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user