Partilhar via


IFileToContentTypeService Interface

Definition

Service for mapping files to the appropriate IContentType for that file.

public interface class IFileToContentTypeService
public interface IFileToContentTypeService
type IFileToContentTypeService = interface
Public Interface IFileToContentTypeService

Remarks

Note that this interface duplicates the methods from IFileExtensionRegistryService and IFileExtensionRegistryService2. The eventual goal is to deprecate the other interfaces and only use IFileToContentTypeService.

Methods

AddFileExtension(String, IContentType)

Adds a new file extension to the registry.

AddFileName(String, IContentType)

Adds a new file name to the registry.

GetContentTypeForExtension(String)

Gets the content type associated with the given file extension.

GetContentTypeForFileName(String)

Gets the content type associated with the given file name.

GetContentTypeForFileNameOrExtension(String)

Gets the content type associated with the given file name or its extension.

GetContentTypeForFilePath(String)

Get the default IContentType for a file located at filePath.

GetContentTypeForFilePathOnly(String)

Get the default IContentType for a file located at filePath.

GetExtensionsForContentType(IContentType)

Gets the list of file extensions associated with the specified content type.

GetFileNamesForContentType(IContentType)

Gets the list of file names associated with the specified content type.

RemoveFileExtension(String)

Removes the specified file extension from the registry.

RemoveFileName(String)

Removes the specified file name from the registry.

Applies to