---
title: fileSizeKey
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/urlresourcekey/filesizekey
---

# fileSizeKey

The key for the file’s size, in bytes.

## Declaration

```swift
static let fileSizeKey: URLResourceKey
```

## Discussion

Discussion The system returns the read-only value as an NSNumber object.

## See Also

### File keys

- [fileAllocatedSizeKey](foundation/urlresourcekey/fileallocatedsizekey.md)
- [fileProtectionKey](foundation/urlresourcekey/fileprotectionkey.md)
- [URLFileProtection](foundation/urlfileprotection.md)
- [fileContentIdentifierKey](foundation/urlresourcekey/filecontentidentifierkey.md)
- [fileResourceIdentifierKey](foundation/urlresourcekey/fileresourceidentifierkey.md)
- [fileResourceTypeKey](foundation/urlresourcekey/fileresourcetypekey.md)
- [URLFileResourceType](foundation/urlfileresourcetype.md)
- [fileSecurityKey](foundation/urlresourcekey/filesecuritykey.md)
- [isAliasFileKey](foundation/urlresourcekey/isaliasfilekey.md)
- [isPackageKey](foundation/urlresourcekey/ispackagekey.md)
- [isRegularFileKey](foundation/urlresourcekey/isregularfilekey.md)
- [isPurgeableKey](foundation/urlresourcekey/ispurgeablekey.md)
- [isSparseKey](foundation/urlresourcekey/issparsekey.md)
- [mayHaveExtendedAttributesKey](foundation/urlresourcekey/mayhaveextendedattributeskey.md)
- [mayShareFileContentKey](foundation/urlresourcekey/maysharefilecontentkey.md)
