---
title: "withUnsafeMutableBytes(_:)"
framework: fskit
role: symbol
role_heading: Instance Method
path: "fskit/fsmutablefiledatabuffer/withunsafemutablebytes(_:)"
---

# withUnsafeMutableBytes(_:)

Performs the given closure with an unsafe pointer to the underlying bytes of the data buffer.

## Declaration

```swift
func withUnsafeMutableBytes<R, E>(_ body: (UnsafeMutableRawBufferPointer) throws(E) -> R) throws(E) -> R where E : Error
```

## Parameters

- `body`: The closure to perform with the pointer.

## See Also

### Accessing buffer properties

- [length](fskit/fsmutablefiledatabuffer/length.md)
