<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/Stat/size",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System4StatV4sizes5Int64Vvp"
  },
  "title" : "size"
}
-->

# size

Total size, in bytes

```
var size: Int64 { get set }
```

## Discussion

The semantics of this property are tied to the underlying C `st_size` field,
which can have file-system–dependent behavior. For example, this property
can return different values for a file’s data fork and resource fork, and some
file systems report logical size rather than actual disk usage for compressed
or cloned files.

The corresponding C property is `st_size`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)