Skip to content

Commit 501bb7d

Browse files
committed
Remove commented-out code for future directions
1 parent 98712f6 commit 501bb7d

File tree

3 files changed

+0
-99
lines changed

3 files changed

+0
-99
lines changed

Sources/System/FileSystem/Identifiers.swift

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,6 @@ public struct DeviceID: RawRepresentable, Sendable, Hashable, Codable {
6262
/// Creates a strongly-typed `DeviceID` from the raw C value.
6363
@_alwaysEmitIntoClient
6464
public init(_ rawValue: CInterop.DeviceID) { self.rawValue = rawValue }
65-
66-
// TODO: API review for ID wrapper functionality
67-
68-
// /// Creates a `DeviceID` from the given major and minor device numbers.
69-
// ///
70-
// /// The corresponding C function is `makedev()`.
71-
// @_alwaysEmitIntoClient
72-
// private static func make(major: CUnsignedInt, minor: CUnsignedInt) -> DeviceID {
73-
// DeviceID(rawValue: system_makedev(major, minor))
74-
// }
75-
//
76-
// /// The major device number
77-
// ///
78-
// /// The corresponding C function is `major()`.
79-
// @_alwaysEmitIntoClient
80-
// private var major: CInt { system_major(rawValue) }
81-
//
82-
// /// The minor device number
83-
// ///
84-
// /// The corresponding C function is `minor()`.
85-
// @_alwaysEmitIntoClient
86-
// private var minor: CInt { system_minor(rawValue) }
8765
}
8866

8967
/// A Swift wrapper of the C `ino_t` type.

Sources/System/FileSystem/Stat.swift

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,6 @@ public struct Stat: RawRepresentable, Sendable {
8585
@available(macOS 26.0, iOS 26.0, tvOS 26.0, watchOS 26.0, visionOS 26.0, *)
8686
public static var resolveBeneath: Flags { Flags(rawValue: _AT_RESOLVE_BENEATH) }
8787
#endif
88-
89-
// TODO: Re-enable when _GNU_SOURCE can be defined.
90-
// #if os(FreeBSD) || os(Linux) || os(Android)
91-
// /// If the path is an empty string (or `NULL` since Linux 6.11),
92-
// /// return information about the given file descriptor.
93-
// ///
94-
// /// The corresponding C constant is `AT_EMPTY_PATH`.
95-
// /// - Note: Only available on FreeBSD, Linux, and Android.
96-
// @_alwaysEmitIntoClient
97-
// public static var emptyPath: Flags { Flags(rawValue: _AT_EMPTY_PATH) }
98-
// #endif
9988
}
10089

10190
// MARK: Initializers
@@ -520,59 +509,6 @@ public struct Stat: RawRepresentable, Sendable {
520509
}
521510
#endif
522511

523-
// TODO: Investigate changing time properties to UTCClock.Instant once available.
524-
525-
// /// Time of last access, given as a `UTCClock.Instant`
526-
// ///
527-
// /// The corresponding C property is `st_atim` (or `st_atimespec` on Darwin).
528-
// public var accessTime: UTCClock.Instant {
529-
// get {
530-
// UTCClock.systemEpoch.advanced(by: Duration(st_atim))
531-
// }
532-
// set {
533-
// st_atim = timespec(UTCClock.systemEpoch.duration(to: newValue))
534-
// }
535-
// }
536-
//
537-
// /// Time of last modification, given as a `UTCClock.Instant`
538-
// ///
539-
// /// The corresponding C property is `st_mtim` (or `st_mtimespec` on Darwin).
540-
// public var modificationTime: UTCClock.Instant {
541-
// get {
542-
// UTCClock.systemEpoch.advanced(by: Duration(st_mtim))
543-
// }
544-
// set {
545-
// st_mtim = timespec(UTCClock.systemEpoch.duration(to: newValue))
546-
// }
547-
// }
548-
//
549-
// /// Time of last status (inode) change, given as a `UTCClock.Instant`
550-
// ///
551-
// /// The corresponding C property is `st_ctim` (or `st_ctimespec` on Darwin).
552-
// public var changeTime: UTCClock.Instant {
553-
// get {
554-
// UTCClock.systemEpoch.advanced(by: Duration(st_ctim))
555-
// }
556-
// set {
557-
// st_ctim = timespec(UTCClock.systemEpoch.duration(to: newValue))
558-
// }
559-
// }
560-
//
561-
// #if SYSTEM_PACKAGE_DARWIN || os(FreeBSD)
562-
// /// Time of file creation, given as a `UTCClock.Instant`
563-
// ///
564-
// /// The corresponding C property is `st_birthtim` (or `st_birthtimespec` on Darwin).
565-
// /// - Note: Only available on Darwin and FreeBSD.
566-
// public var creationTime: UTCClock.Instant {
567-
// get {
568-
// UTCClock.systemEpoch.advanced(by: Duration(st_birthtim))
569-
// }
570-
// set {
571-
// st_birthtim = timespec(UTCClock.systemEpoch.duration(to: newValue))
572-
// }
573-
// }
574-
// #endif
575-
576512
#if SYSTEM_PACKAGE_DARWIN || os(FreeBSD) || os(OpenBSD)
577513
/// File flags
578514
///

Sources/System/Internals/Exports.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,6 @@ internal func system_fstat(_ fd: CInt, _ s: inout CInterop.Stat) -> Int32 {
103103
internal func system_fstatat(_ fd: CInt, _ p: UnsafePointer<CChar>, _ s: inout CInterop.Stat, _ flags: CInt) -> Int32 {
104104
fstatat(fd, p, &s, flags)
105105
}
106-
107-
@usableFromInline
108-
internal func system_major(_ dev: CInterop.DeviceID) -> CInt {
109-
numericCast((dev >> 24) & 0xff)
110-
}
111-
@usableFromInline
112-
internal func system_minor(_ dev: CInterop.DeviceID) -> CInt {
113-
numericCast(dev & 0xffffff)
114-
}
115-
@usableFromInline
116-
internal func system_makedev(_ maj: CUnsignedInt, _ min: CUnsignedInt) -> CInterop.DeviceID {
117-
CInterop.DeviceID((maj << 24) | min)
118-
}
119106
#endif
120107

121108
// Convention: `system_platform_foo` is a

0 commit comments

Comments
 (0)