You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Proposals/0006-system-stat.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ These initializers use a typed `throws(Errno)` and require Swift 6.0 or later.
79
79
80
80
See the **Appendix** section at the end of this proposal for a table view of Swift API to C mappings.
81
81
82
-
All API are marked `@_alwaysEmitIntoClient` for performance and back-dating of availability.
82
+
All API are marked `@_alwaysEmitIntoClient` for performance and back-dating of availability, except `Stat`'s `==` and `hash(into:)`, which are ordinary `public` API.
83
83
84
84
### FileType
85
85
@@ -693,24 +693,27 @@ public struct Stat: RawRepresentable, Sendable {
693
693
694
694
/// File generation number
695
695
///
696
-
/// The file generation number is used to distinguish between different files
697
-
/// that have used the same inode over time.
696
+
/// The file generation number may be used to distinguish between different
697
+
///files that have used the same inode over time.
698
698
///
699
699
/// The corresponding C property is `st_gen`.
700
-
/// - Note: Only available on Darwin, FreeBSD, and OpenBSD.
701
-
publicvar generationNumber: Int { getset }
700
+
/// - Note: Only available on Darwin, FreeBSD, and OpenBSD. The underlying C
701
+
/// field is 32-bit on Darwin and OpenBSD, and 64-bit on FreeBSD.
702
+
publicvar generationNumber: UInt64 { getset }
702
703
#endif
703
704
}
704
705
705
706
// MARK: - Equatable and Hashable
706
707
707
708
extensionStat: Equatable{
708
-
/// Compares the raw bytes of two `Stat` structs for equality.
709
+
/// Compares the meaningful file-metadata fields of two `Stat` values.
710
+
///
711
+
/// Alignment padding and platform reserved/"spare" fields are not compared.
709
712
publicstaticfunc== (lhs: Self, rhs: Self) ->Bool
710
713
}
711
714
712
715
extensionStat: Hashable{
713
-
/// Hashes the raw bytes of this `Stat` struct.
716
+
/// Hashes the meaningful file-metadata fields of a `Stat` struct.
0 commit comments