mirror of
https://github.com/wibus-wee/InjectGUI.git
synced 2025-11-25 19:37:33 +08:00
19 lines
348 B
Swift
19 lines
348 B
Swift
//
|
|
// Extension+URL.swift
|
|
// InjectGUI
|
|
//
|
|
// Created by wibus on 2024/8/4.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension URL {
|
|
func pathWithFallback(percentEncoded: Bool = true) -> String {
|
|
if #available(macOS 13.0, *) {
|
|
return self.path(percentEncoded: percentEncoded)
|
|
} else {
|
|
return self.path
|
|
}
|
|
}
|
|
}
|