Library Moduleswift-package-manager 5.10.1Basics
Basics
import Basics
Module information
- Declarations
- 936
- Symbols
- 1135
Uncategorized
Protocols
protocol Archiver
The
Archiver
protocol abstracts away the different operations surrounding archives.protocol AuthorizationProvider
protocol AuthorizationWriter
protocol Cancellable
protocol DiagnosticsEmitterProtocol
protocol DiagnosticsHandler
protocol ImportScanner
protocol ObservabilityHandlerProvider
protocol ObservabilityMetadataKey
Types
struct AbsolutePath
Represents an absolute file system path, independently of what (or whether anything at all) exists at that path in the file system at any given time. An absolute path always starts with a
/
character, and holds a normalized string representation. This normalization is strictly syntactic, and does not access the file system in any way.enum AuthorizationProviderError
struct CancellationError
class Cancellator
struct CompositeAuthorizationProvider
enum Concurrency
enum DarwinPlatform
Represents any of the “Apple” platforms handled by
DarwinToolchain
. This boils down a lot of complicated logic about different variants and environments into a straightforward, tightly-modeled type that can be switched over.struct Diagnostic
struct DiagnosticsEmitter
actor HTTPClient
async
-friendly wrapper for HTTP clients. It allows a specific client implementation (either Foundation or NIO-based) to be hidden from users of the wrapper.enum HTTPClientCircuitBreakerStrategy
struct HTTPClientConfiguration
enum HTTPClientError
struct HTTPClientHeaders
struct HTTPClientRequest
struct HTTPClientResponse
enum HTTPClientRetryStrategy
enum HTTPMethod
struct InternalError
class LegacyHTTPClient
struct LegacyHTTPClientConfiguration
struct LegacyHTTPClientRequest
struct Netrc
Representation of Netrc configuration
class NetrcAuthorizationProvider
enum NetrcError
struct NetrcParser
struct ObservabilityMetadata
Provides type-safe access to the ObservabilityMetadata’s values. This API should ONLY be used inside of accessor implementations.
class ObservabilityScope
class ObservabilitySystem
struct RelativePath
Represents a relative file system path. A relative path never starts with a
/
character, and holds a normalized string representation. As with AbsolutePath, the normalization is strictly syntactic, and does not access the file system in any way.class SQLite
A minimal SQLite wrapper.
class SQLiteBackedCache<Value>
SQLite backed persistent cache.
struct SQLiteBackedCacheConfiguration
enum Sandbox
enum SandboxNetworkPermission
actor SendableBox<Value>
A
Sendable
storage that allows access from concurrently running tasks in anasync
closure. This type serves as a replacement forThreadSafeBox
implemented with Swift Concurrency primitives.struct SerializedJSON
Wrapper type representing serialized escaped JSON strings providing helpers for escaped string interpolations for common types such as
AbsolutePath
.enum SignpostID
enum SignpostName
enum SignpostType
struct SourceControlURL
struct SwiftVersion
struct SwiftcImportScanner
struct TarArchiver
An
Archiver
that handles Tar archives using the command-linetar
tool.class ThreadSafeArrayStore<Value>
Thread-safe array like structure
class ThreadSafeBox<Value>
Thread-safe value boxing structure
class ThreadSafeKeyValueStore<Key, Value>
Thread-safe dictionary like structure
actor TokenBucket
Type modeled after a “token bucket” pattern, which is similar to a semaphore, but is built with Swift Concurrency primitives.
struct Triple
Helper for working with target triples.
struct UniversalArchiver
An
Archiver
that handles multiple formats by delegating to other existing archivers each dedicated to its own format.struct VFSOverlay
class VirtualFileSystem
A JSON-backed, read-only virtual file system.
class WalkResult
struct ZipArchiver
An
Archiver
that handles ZIP archives using the command-linezip
andunzip
tools.
Typealiases
typealias CancellationHandler
typealias EnvironmentVariables
typealias FileSystem
typealias SendableTimeInterval
This typealias hides
DispatchTimeInterval
as an implementation detail until we can useSwift.Duration
, as the latter requires macOS 13.typealias StringError
typealias TSCAbsolutePath
typealias TSCRelativePath
Globals
var localFileSystem: any FileSystem
func getEnvSearchPaths(pathString: String?, currentWorkingDirectory: AbsolutePath?
) -> [AbsolutePath] Create a list of AbsolutePath search paths from a string, such as the PATH environment variable.
func lookupExecutablePath(filename: String?, currentWorkingDirectory: AbsolutePath?, searchPaths: [AbsolutePath]
) -> AbsolutePath? Lookup an executable path from an environment variable value, current working directory or search paths. Only return a value that is both found and executable.
func makeDirectories(AbsolutePath
) throws func os_signpost(SignpostType, name: StaticString, signpostID: SignpostID
) Emits a signpost.
func resolveSymlinks(AbsolutePath
) throws -> AbsolutePath func temp_await<T, ErrorType>((@escaping (Result<T, ErrorType>) -> Void) -> Void
) throws -> T func temp_await<T>((@escaping (T) -> Void) -> Void
) -> T func walk(AbsolutePath, fileSystem: any FileSystem, recursively: Bool
) throws -> WalkResult func withTemporaryDirectory<Result>(dir: AbsolutePath?, prefix: String, (AbsolutePath, @escaping (AbsolutePath) async -> Void) async throws -> Result
) async throws -> Result func withTemporaryDirectory<Result>(dir: AbsolutePath?, prefix: String, (AbsolutePath, @escaping (AbsolutePath) -> Void) throws -> Result
) throws -> Result func withTemporaryDirectory<Result>(dir: AbsolutePath?, prefix: String, removeTreeOnDeinit: Bool, (AbsolutePath) throws -> Result
) throws -> Result func withTemporaryDirectory<Result>(dir: AbsolutePath?, prefix: String, removeTreeOnDeinit: Bool, (AbsolutePath) async throws -> Result
) async throws -> Result func withTemporaryDirectory<Result>(fileSystem: any FileSystem, dir: AbsolutePath?, prefix: String, @escaping (AbsolutePath, @escaping (AbsolutePath) -> Void) async throws -> Result
) throws -> Task<Result, any Error> Creates a temporary directory and evaluates a closure with the directory path as an argument. The temporary directory will live on disk while the closure is evaluated and will be deleted when the cleanup closure is called. This allows the temporary directory to have an arbitrary lifetime.
func withTemporaryDirectory<Result>(fileSystem: any FileSystem, dir: AbsolutePath?, prefix: String, removeTreeOnDeinit: Bool, @escaping (AbsolutePath) async throws -> Result
) throws -> Task<Result, any Error> Creates a temporary directory and evaluates a closure with the directory path as an argument. The temporary directory will live on disk while the closure is evaluated and will be deleted afterwards.
Other modules
Build
CompilerPluginSupport
DriverSupport
LLBuildManifest
PackageCollections
PackageCollectionsModel
PackageCollectionsSigning
PackageDescription
Create reusable code, organize it in a lightweight way, and share it across your projects and with other developers.
PackageFingerprint
PackageGraph
PackageLoading
PackageMetadata
PackageModel
PackagePlugin
PackageRegistry
PackageSigning
SPMBuildCore
SPMLLBuild
SPMSQLite3system
SourceControl
Workspace
XCBuildSupport