mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-01 04:34:49 -04:00
21 lines
644 B
C#
21 lines
644 B
C#
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);
|
|
}
|
|
}
|
|
} |