## DetectFileFormat(Stream) {#detectfileformat}

Detects and returns the information about a format of a file stored in a stream.

```csharp
public static FileFormatInfo DetectFileFormat(Stream stream)
```

| Parameter | Type | Description |
| --- | --- | --- |
| stream | Stream | Source stream. |

### Return Value

The result [`FileFormatInfo`](../../../aspose.email/fileformatinfo/)

### See Also

* class [FileFormatInfo](../../../aspose.email/fileformatinfo/)
* class [FileFormatUtil](../)
* namespace [Aspose.Email.Tools](../../fileformatutil/)
* assembly [Aspose.Email](../../../)

---

## DetectFileFormat(string) {#detectfileformat_1}

Detects and returns the information about a format of a file.

```csharp
public static FileFormatInfo DetectFileFormat(string filePath)
```

| Parameter | Type | Description |
| --- | --- | --- |
| filePath | String | Path to the source file. |

### Return Value

The result [`FileFormatInfo`](../../../aspose.email/fileformatinfo/)

### See Also

* class [FileFormatInfo](../../../aspose.email/fileformatinfo/)
* class [FileFormatUtil](../)
* namespace [Aspose.Email.Tools](../../fileformatutil/)
* assembly [Aspose.Email](../../../)


