---
title: "loadFileWrapperRepresentation:ofType:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocument/loadfilewrapperrepresentation:oftype:"
---

# loadFileWrapperRepresentation:ofType:

Loads document data from a given file wrapper.

## Declaration

```occ
- (BOOL) loadFileWrapperRepresentation:(NSFileWrapper *) wrapper ofType:(NSString *) type;
```

## Discussion

Discussion Loads document data in file wrapper wrapper of type docType into the receiver, displays it in windows, and returns whether the operation was successful. If wrapper is a simple file, it invokes loadDataRepresentation:ofType: to load the data. If wrapper is a directory, it returns false by default; subclasses can override to handle file wrappers that are directories. This method is typically invoked by readFromFile:ofType: after it creates an NSData object from the contents of the file.

## See Also

### Methods

- [dataRepresentationOfType:](appkit/nsdocument/datarepresentationoftype:.md)
- [fileAttributesToWriteToFile:ofType:saveOperation:](appkit/nsdocument/fileattributestowritetofile:oftype:saveoperation:.md)
- [fileName](appkit/nsdocument/filename.md)
- [fileWrapperRepresentationOfType:](appkit/nsdocument/filewrapperrepresentationoftype:.md)
- [initWithContentsOfFile:ofType:](appkit/nsdocument/initwithcontentsoffile:oftype:.md)
- [initWithContentsOfURL:ofType:](appkit/nsdocument/initwithcontentsofurl:oftype:.md)
- [loadDataRepresentation:ofType:](appkit/nsdocument/loaddatarepresentation:oftype:.md)
- [printShowingPrintPanel:](appkit/nsdocument/printshowingprintpanel:.md)
- [readFromFile:ofType:](appkit/nsdocument/readfromfile:oftype:.md)
- [readFromURL:ofType:](appkit/nsdocument/readfromurl:oftype:.md)
- [revertToSavedFromFile:ofType:](appkit/nsdocument/reverttosavedfromfile:oftype:.md)
- [revertToSavedFromURL:ofType:](appkit/nsdocument/reverttosavedfromurl:oftype:.md)
- [runModalPageLayoutWithPrintInfo:](appkit/nsdocument/runmodalpagelayoutwithprintinfo:.md)
- [saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:](appkit/nsdocument/savetofile:saveoperation:delegate:didsaveselector:contextinfo:.md)
- [saveToURL:ofType:forSaveOperation:error:](appkit/nsdocument/savetourl:oftype:forsaveoperation:error:.md)
