Table of Contents

Class KnownFolderHelper

Namespace
Microsoft.WindowsAPICodePack.Shell
Assembly
Microsoft.WindowsAPICodePack.Shell.dll

Creates the helper class for known folders.

public static class KnownFolderHelper
Inheritance
KnownFolderHelper
Inherited Members

Methods

FromCanonicalName(string)

Returns the known folder given its canonical name.

public static IKnownFolder FromCanonicalName(string canonicalName)

Parameters

canonicalName string

A non-localized canonical name for the known folder, such as MyComputer.

Returns

IKnownFolder

A known folder representing the specified name.

Exceptions

ArgumentException

Thrown if the given canonical name is invalid or if the KnownFolder could not be created.

FromKnownFolderId(Guid)

Returns a known folder given a globally unique identifier.

public static IKnownFolder FromKnownFolderId(Guid knownFolderId)

Parameters

knownFolderId Guid

A GUID for the requested known folder.

Returns

IKnownFolder

A known folder representing the specified name.

Exceptions

ArgumentException

Thrown if the given Known Folder ID is invalid.

FromParsingName(string)

Returns a known folder given its shell namespace parsing name, such as ::{645FF040-5081-101B-9F08-00AA002F954E} for the Recycle Bin.

public static IKnownFolder FromParsingName(string parsingName)

Parameters

parsingName string

The parsing name (or path) for the requested known folder.

Returns

IKnownFolder

A known folder representing the specified name.

Exceptions

ArgumentException

Thrown if the given parsing name is invalid.

FromPath(string)

Returns a known folder given its shell path, such as C:\users\public\documents or ::{645FF040-5081-101B-9F08-00AA002F954E} for the Recycle Bin.

public static IKnownFolder FromPath(string path)

Parameters

path string

The path for the requested known folder; either a physical path or a virtual path.

Returns

IKnownFolder

A known folder representing the specified name.