---
title: totalFileAllocatedSize
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlresourcevalues/totalfileallocatedsize
---

# totalFileAllocatedSize

The total allocated size of the file, in bytes.

## Declaration

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

## Discussion

Discussion The property returns nil if the information isn’t available. The allocated size in bytes may include space that metadata uses. This can be less than the value that totalFileSize returns after if it’s a compressed resource. note: This only applies 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)
- [totalFileSize](foundation/urlresourcevalues/totalfilesize.md)
