---
title: "removeFileWrapper(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filewrapper/removefilewrapper(_:)"
---

# removeFileWrapper(_:)

Removes a child file wrapper from the receiver, which must be a directory file wrapper.

## Declaration

```swift
func removeFileWrapper(_ child: FileWrapper)
```

## Parameters

- `child`: File wrapper to remove from the directory.

## Discussion

Discussion This method raises NSInternalInconsistencyException if the receiver is not a directory file wrapper.

## See Also

### Accessing File-Wrapper Information

- [fileWrappers](foundation/filewrapper/filewrappers.md)
- [addFileWrapper(_:)](foundation/filewrapper/addfilewrapper(_:).md)
- [addFile(withPath:)](foundation/filewrapper/addfile(withpath:).md)
- [addRegularFile(withContents:preferredFilename:)](foundation/filewrapper/addregularfile(withcontents:preferredfilename:).md)
- [addSymbolicLink(withDestination:preferredFilename:)](foundation/filewrapper/addsymboliclink(withdestination:preferredfilename:).md)
- [keyForChildFileWrapper(_:)](foundation/filewrapper/keyforchildfilewrapper(_:).md)
- [symbolicLinkDestination()](foundation/filewrapper/symboliclinkdestination().md)
- [symbolicLinkDestinationURL](foundation/filewrapper/symboliclinkdestinationurl.md)
