FolderInfo.GetSubFolder

GetSubFolder(string)

Gets the subfolder with the specified name.

public FolderInfo GetSubFolder(string name)
ParameterTypeDescription
nameStringThe name of the subfolder. The comparison is case-sensitive.

Return Value

The subfolder, or null if there is no subfolder with this name.

See Also


GetSubFolder(string, bool)

Gets the subfolder with the specified name, optionally ignoring case.

public FolderInfo GetSubFolder(string name, bool ignoreCase)
ParameterTypeDescription
nameStringThe name of the subfolder.
ignoreCaseBooleantrue to compare names case-insensitively.

Return Value

The subfolder, or null if there is no subfolder with this name.

See Also


GetSubFolder(string, bool, bool)

Retrieves a subfolder with the specified name from the current folder.

public FolderInfo GetSubFolder(string name, bool ignoreCase, bool handlePathSeparator)
ParameterTypeDescription
nameStringThe name of the subfolder to retrieve.
ignoreCaseBooleanSpecifies whether to perform a case-insensitive search for folders with the given name.
handlePathSeparatorBooleanSpecifies whether the specified folder name should be treated as a path if it contains backslashes.

Return Value

The FolderInfo representing the retrieved subfolder, or null if the subfolder is not found.

Remarks

The name parameter specifies the name of the subfolder to retrieve. The ignoreCase parameter determines whether the search for the subfolder name should be case-sensitive or case-insensitive. If set to true, the search will be case-insensitive, otherwise, it will be case-sensitive. The handlePathSeparator parameter specifies whether the specified folder name should be treated as a path if it contains backslashes. If set to true, the method will interpret the folder name as a path, attempting to navigate to the subfolder using the path. If set to false, the method will treat the folder name as a simple name, searching for a subfolder with an exact name match. If the subfolder is found, the method returns the FolderInfo object representing the retrieved subfolder. If the subfolder is not found, the method returns null.

See Also