<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileWrapper/init(serializedRepresentation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileWrapper(im)initWithSerializedRepresentation:"
  },
  "title" : "init(serializedRepresentation:)"
}
-->

# init(serializedRepresentation:)

Initializes the receiver as a regular-file file wrapper from given serialized data.

```
init?(serializedRepresentation serializeRepresentation: Data)
```

## Parameters

`serializeRepresentation`

Serialized representation of a file wrapper in the format used for the `NSFileContentsPboardType` pasteboard type. Data of this format is returned by such methods as [`serializedRepresentation`](/documentation/Foundation/FileWrapper/serializedRepresentation) and [`rtfd(from:documentAttributes:)`](/documentation/Foundation/NSAttributedString/rtfd(from:documentAttributes:)) ([`NSAttributedString`](/documentation/Foundation/NSAttributedString)).

## Return Value

Regular-file file wrapper initialized from `serializedRepresentation`.

## Discussion

The file wrapper is not associated with a file-system node until you save it using [`write(to:options:originalContentsURL:)`](/documentation/Foundation/FileWrapper/write(to:options:originalContentsURL:)).

## See Also

[`preferredFilename`](/documentation/Foundation/FileWrapper/preferredFilename)

The preferred filename for the file wrapper object.

[`filename`](/documentation/Foundation/FileWrapper/filename)

The filename of the file wrapper object

[`fileAttributes`](/documentation/Foundation/FileWrapper/fileAttributes)

A dictionary of file attributes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)