# `GSInstance fileName:error:`

*Instance Method*

Returns the file name with the specified format.

## Declaration

```swift
func fileName(_ format: GSFontFormat) throws -> String
```

```objc
- (NSString *) fileName:(GSFontFormat) format error:(NSError **) error;
```

```python
fileName_error_(format: GSFontFormat) -> tuple[str, NSError]
```

## Parameters

- `format` — The format to use for the file name.
- `error` — A pointer to an NSError object to store any error that occurs.

## Return Value

The file name, or nil if an error occurs.

