# flytekit.types.file

This module provides functionality related to FlyteFile
## Directory

### Classes

| Class | Description |
|-|-|
| [`FileExt`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.types.file/page.md#flytekittypesfilefileext) | Used for annotating file extension types of FlyteFile. |

## flytekit.types.file.FileExt

Used for annotating file extension types of FlyteFile.
This is useful for extensions that have periods in them, e.g., "tar.gz".

TAR_GZ = Annotated[str, FileExt("tar.gz")]

### Parameters

```python
class FileExt(
    ext: str,
)
```
| Parameter | Type | Description |
|-|-|-|
| `ext` | `str` | |

### Methods

| Method | Description |
|-|-|
| [`check_and_convert_to_str()`](#check_and_convert_to_str) |  |

#### check_and_convert_to_str()

```python
def check_and_convert_to_str(
    item: typing.Union[typing.Type, str],
) -> str
```
| Parameter | Type | Description |
|-|-|-|
| `item` | `typing.Union[typing.Type, str]` | |

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flytekit-sdk/packages/flytekit.types.file.md
**HTML**: https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.types.file/
