---
title: appendBytes
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15.2+]
path: kernel/osdata/3433841-appendbytes
---

# appendBytes

Appends a buffer of bytes to the OSData object's internal data buffer.

## Declaration

```occ
bool appendBytes(const OSData *aDataObj);
```

```occ
virtual bool appendBytes(const OSData *aDataObj);
```

## Parameters

- `aDataObj`: An OSData object to copy all bytes from.

## Return Value

Return Value true on success or false on failure, due to allocation failure.

## See Also

### Appending Data to the Object

- [appendBytes](driverkit/osdata/appendbytes-lbqa.md)
