---
title: serializedRepresentation
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/filewrapper/serializedrepresentation
---

# serializedRepresentation

The contents of the file wrapper as an opaque data object.

## Declaration

```swift
var serializedRepresentation: Data? { get }
```

## Discussion

Discussion This property contains a data object in the format used by the fileContents pasteboard type. This data object is also suitable for passing to init(serializedRepresentation:). This property may be nil if the user modifies the contents of the file system node after you call read(from:options:) or init(url:options:), but before FileWrapper has read the contents of the file.  You can use the immediate reading option to reduce the likelihood of this problem.

## See Also

### Related Documentation

- [init(serializedRepresentation:)](foundation/filewrapper/init(serializedrepresentation:).md)
