StikDebug/StikJIT/Utilities/Extensions.swift
2025-09-16 16:47:13 -04:00

20 lines
618 B
Swift

//
// Extensions.swift
// StikDebug
//
// Created by s s on 2025/7/9.
//
import UniformTypeIdentifiers
extension FileManager {
func filePath(atPath path: String, withLength length: Int) -> String? {
guard let file = try? contentsOfDirectory(atPath: path).filter({ $0.count == length }).first else { return nil }
return "\(path)/\(file)"
}
}
extension UIDocumentPickerViewController {
@objc func fix_init(forOpeningContentTypes contentTypes: [UTType], asCopy: Bool) -> UIDocumentPickerViewController {
return fix_init(forOpeningContentTypes: contentTypes, asCopy: true)
}
}