---
title: regularFileContents
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/filewrapper/regularfilecontents
---

# regularFileContents

The contents of the file-system node associated with a regular-file file wrapper.

## Declaration

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

## Discussion

Discussion This property may contain nil if the user modifies the file after you call read(from:options:) or init(url:options:) but before FileWrapper has read the contents of the file. Use the immediate reading option to reduce the likelihood of that problem. Special Considerations This property raises NSInternalInconsistencyException if the file wrapper object is not a regular-file file wrapper.

## See Also

### Related Documentation

- [read(from:options:)](foundation/filewrapper/read(from:options:).md)
- [init(regularFileWithContents:)](foundation/filewrapper/init(regularfilewithcontents:).md)

### Accessing Files

- [filename](foundation/filewrapper/filename.md)
- [preferredFilename](foundation/filewrapper/preferredfilename.md)
- [fileAttributes](foundation/filewrapper/fileattributes.md)
