---
title: "CFStringGetMaximumSizeOfFileSystemRepresentation(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringgetmaximumsizeoffilesystemrepresentation(_:)"
---

# CFStringGetMaximumSizeOfFileSystemRepresentation(_:)

Determines the upper bound on the number of bytes required to hold the file system representation of the string.

## Declaration

```swift
func CFStringGetMaximumSizeOfFileSystemRepresentation(_ string: CFString!) -> CFIndex
```

## Parameters

- `string`: The string to convert.

## Return Value

Return Value The upper bound on the number of bytes required to hold the file system representation of the string.

## Discussion

Discussion The result is returned quickly as a rough approximation, and could be much larger than the actual space required. The result includes space for the zero termination. If you are allocating a buffer for long-term storage, you should reallocate it to be the right size after calling CFStringGetFileSystemRepresentation(_:_:_:).

## See Also

### String File System Representations

- [CFStringCreateWithFileSystemRepresentation(_:_:)](corefoundation/cfstringcreatewithfilesystemrepresentation(_:_:).md)
- [CFStringGetFileSystemRepresentation(_:_:_:)](corefoundation/cfstringgetfilesystemrepresentation(_:_:_:).md)
