---
title: "init(bytesRead:itemAttributes:)"
framework: fskit
role: symbol
role_heading: Initializer
path: "fskit/fsreadfileresult/init(bytesread:itemattributes:)"
---

# init(bytesRead:itemAttributes:)

Creates a result for a file-reading operation.

## Declaration

```swift
init?(bytesRead actuallyRead: Int, itemAttributes attributes: FSItem.Attributes)
```

## Parameters

- `actuallyRead`: The number of bytes actually read from the file. This may be less than the requested length if the end of file was reached.
- `attributes`: The updated doc://FSKit/documentation/FSKit/FSItem/Attributes of the file after the read operation (e.g., updated access time).

## Return Value

Return Value A populated result instance, or nil if validation fails.

## See Also

### Creating a read-file result

- [FSItem.Attributes](fskit/fsitem/attributes.md)
