this repo has no description
www.jonmsterling.com/01HC/
1// SPDX-FileCopyrightText: 2025 The Project Pterodactyl Developers
2//
3// SPDX-License-Identifier: MPL-2.0
4
5import Foundation
6import TSCBasic
7import LanguageServerProtocol
8
9extension AbsolutePath {
10 public static func fromDocumentUri(_ uri: DocumentUri) throws -> Self {
11 guard let url = URL(string: uri) else {
12 throw URLError(.badURL)
13 }
14 guard url.isFileURL else {
15 throw URLError(.unsupportedURL)
16 }
17 return try Self(validating: url.path)
18 }
19}