diff options
Diffstat (limited to 'MediaBrowser.Controller/Providers/DirectoryService.cs')
| -rw-r--r-- | MediaBrowser.Controller/Providers/DirectoryService.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs index 4fdc08da0..74a9c6606 100644 --- a/MediaBrowser.Controller/Providers/DirectoryService.cs +++ b/MediaBrowser.Controller/Providers/DirectoryService.cs @@ -11,6 +11,7 @@ namespace MediaBrowser.Controller.Providers { IEnumerable<FileSystemInfo> GetFileSystemEntries(string path); IEnumerable<FileSystemInfo> GetFiles(string path); + IEnumerable<FileSystemInfo> GetDirectories(string path); IEnumerable<FileSystemInfo> GetFiles(string path, bool clearCache); FileSystemInfo GetFile(string path); Dictionary<string, FileSystemInfo> GetFileSystemDictionary(string path); @@ -109,5 +110,10 @@ namespace MediaBrowser.Controller.Providers return entry; } + + public IEnumerable<FileSystemInfo> GetDirectories(string path) + { + return GetFileSystemEntries(path, false).Where(i => (i.Attributes & FileAttributes.Directory) == FileAttributes.Directory); + } } } |
