Table of Contents

Class FSGetFolders

Namespace
SunamoGetFolders
Assembly
SunamoGetFolders.dll

Provides methods for getting folders from the file system

public class FSGetFolders
Inheritance
FSGetFolders
Inherited Members
Extension Methods

Methods

GetFoldersEveryFolder(ILogger, string, string)

Gets all folders that match the specified regex pattern

public static List<string> GetFoldersEveryFolder(ILogger logger, string folderPath, string regexPattern)

Parameters

logger ILogger

Logger instance for logging operations

folderPath string

The folder path to search

regexPattern string

Regular expression pattern to match folder names

Returns

List<string>

List of folder paths matching the pattern

GetFoldersEveryFolder(ILogger, string, string, SearchOption, GetFoldersEveryFolderArgs?)

Gets all folders in the specified directory with optional filtering Only this interface signature can be used - other overloads wouldn't know which method to call when only logger is provided

public static List<string> GetFoldersEveryFolder(ILogger logger, string folderPath, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly, GetFoldersEveryFolderArgs? args = null)

Parameters

logger ILogger

Logger instance for logging operations

folderPath string

The folder path to search

searchPattern string

Search pattern for folder names (supports wildcards, default is "*")

searchOption SearchOption

Search option for top directory only or all directories

args GetFoldersEveryFolderArgs

Optional arguments for folder retrieval configuration

Returns

List<string>

List of folder paths matching the criteria

GetFoldersEveryFolderWhichContainsFiles(ILogger, string, string, SearchOption)

Gets all folders that contain files matching the specified pattern

public static List<string> GetFoldersEveryFolderWhichContainsFiles(ILogger logger, string folderPath, string searchPattern, SearchOption searchOption)

Parameters

logger ILogger

Logger instance for logging operations

folderPath string

The folder path to search

searchPattern string

The file search pattern (e.g., "*.txt")

searchOption SearchOption

Search option for top directory only or all directories

Returns

List<string>

List of folder paths that contain matching files