Lots of changes to get code ready to add library.
This commit is contained in:
parent
67b97b3be2
commit
d5eed4e85d
20 changed files with 570 additions and 3 deletions
21
API/Services/DirectoryService.cs
Normal file
21
API/Services/DirectoryService.cs
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue