---
title: "removeAll(keepingCapacity:)"
framework: system
role: symbol
role_heading: Instance Method
path: "system/filepath/removeall(keepingcapacity:)"
---

# removeAll(keepingCapacity:)

Remove the contents of the path, keeping the null terminator.

## Declaration

```swift
mutating func removeAll(keepingCapacity: Bool = false)
```
