From 8e09ede76d975ff5aa5edde7043c017c43b20b84 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Mon, 13 May 2024 11:19:43 +0100 Subject: [PATCH] Remove accidentally public functions. These can't be new API as they haven't been reviewed. --- Sources/System/ErrnoWindows.swift | 2 +- Sources/System/FileOperations.swift | 4 ++-- Sources/System/FilePath/FilePathTemp.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/System/ErrnoWindows.swift b/Sources/System/ErrnoWindows.swift index b94b577..cc481cb 100644 --- a/Sources/System/ErrnoWindows.swift +++ b/Sources/System/ErrnoWindows.swift @@ -12,7 +12,7 @@ import WinSDK extension Errno { - public init(windowsError: DWORD) { + internal init(windowsError: DWORD) { self.init(rawValue: _mapWindowsErrorToErrno(windowsError)) } } diff --git a/Sources/System/FileOperations.swift b/Sources/System/FileOperations.swift index ba70e87..3412834 100644 --- a/Sources/System/FileOperations.swift +++ b/Sources/System/FileOperations.swift @@ -516,7 +516,7 @@ extension FilePermissions { /// files or directories. Note that this mask is process-wide, and that /// *getting* it is not thread safe. @_alwaysEmitIntoClient - public static var creationMask: FilePermissions { + internal static var creationMask: FilePermissions { get { let oldMask = _umask(0o22) _ = _umask(oldMask) @@ -536,7 +536,7 @@ extension FilePermissions { /// This is more efficient than reading `creationMask` and restoring it /// afterwards, because of the way reading the creation mask works. @_alwaysEmitIntoClient - public static func withCreationMask( + internal static func withCreationMask( _ permissions: FilePermissions, body: () throws -> R ) rethrows -> R { diff --git a/Sources/System/FilePath/FilePathTemp.swift b/Sources/System/FilePath/FilePathTemp.swift index 7b41d0b..c0edf95 100644 --- a/Sources/System/FilePath/FilePathTemp.swift +++ b/Sources/System/FilePath/FilePathTemp.swift @@ -18,7 +18,7 @@ /// Creates a temporary directory with a name based on the given `basename`, /// executes `body`, passing in the path of the created directory, then /// deletes the directory and all of its contents before returning. -public func withTemporaryFilePath( +internal func withTemporaryFilePath( basename: FilePath.Component, _ body: (FilePath) throws -> R ) throws -> R {