---
title: totalFileSize
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlresourcevalues/totalfilesize
---

# totalFileSize

The total displayable size of the file, in bytes.

## Declaration

```swift
var totalFileSize: Int? { get }
```

## Discussion

Discussion The allocated size in bytes may include space used by metadata. The property returns nil if the information isn’t available. note: Only applicable to regular files.

## See Also

### File values

- [documentIdentifier](foundation/urlresourcevalues/documentidentifier.md)
- [fileContentIdentifier](foundation/urlresourcevalues/filecontentidentifier.md)
- [fileAllocatedSize](foundation/urlresourcevalues/fileallocatedsize.md)
- [fileProtection](foundation/urlresourcevalues/fileprotection.md)
- [fileResourceIdentifier](foundation/urlresourcevalues/fileresourceidentifier.md)
- [fileResourceType](foundation/urlresourcevalues/fileresourcetype.md)
- [fileSecurity](foundation/urlresourcevalues/filesecurity.md)
- [fileSize](foundation/urlresourcevalues/filesize.md)
- [isPurgeable](foundation/urlresourcevalues/ispurgeable.md)
- [isSparse](foundation/urlresourcevalues/issparse.md)
- [mayHaveExtendedAttributes](foundation/urlresourcevalues/mayhaveextendedattributes.md)
- [isExecutable](foundation/urlresourcevalues/isexecutable.md)
- [isRegularFile](foundation/urlresourcevalues/isregularfile.md)
- [mayShareFileContent](foundation/urlresourcevalues/maysharefilecontent.md)
- [totalFileAllocatedSize](foundation/urlresourcevalues/totalfileallocatedsize.md)
