Compartilhar via


IFileToContentTypeService.GetContentTypeForFilePath(String) Method

Definition

Get the default IContentType for a file located at filePath.

public:
 Microsoft::VisualStudio::Utilities::IContentType ^ GetContentTypeForFilePath(System::String ^ filePath);
public Microsoft.VisualStudio.Utilities.IContentType GetContentTypeForFilePath (string filePath);
abstract member GetContentTypeForFilePath : string -> Microsoft.VisualStudio.Utilities.IContentType
Public Function GetContentTypeForFilePath (filePath As String) As IContentType

Parameters

filePath
String

Name of the file in question.

Returns

Excpected content type or UnknownContentType if no content type is found.

Remarks

If no IContentType is found using declared IFilePathToContentTypeProvider assets, then the GetContentTypeForFileNameOrExtension(String) is used.

Applies to