Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Sources/TSCBasic/FileSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1164,8 +1164,19 @@ public class RerootedFileSystemView: FileSystem {
// `underlyingFileSystem` is required to be `Sendable`.
extension RerootedFileSystemView: @unchecked Sendable {}

private var _localFileSystem: any FileSystem = LocalFileSystem()

/// Public access to the local FS proxy.
public var localFileSystem: FileSystem = LocalFileSystem()
public var localFileSystem: any FileSystem {
get {
return _localFileSystem
}

@available(*, deprecated, message: "This global should never be mutable and is supposed to be read-only. Deprecated in Apr 2023.")
set {
_localFileSystem = newValue
}
}

// `LocalFileSystem` doesn't hold any internal state and all of its underlying operations are blocking.
extension LocalFileSystem: @unchecked Sendable {}
Expand Down