import Foundation
if let argument = CommandLine.arguments.dropFirst().first {
let url = URL(fileURLWithPath: argument)
if let uti = (try? url.resourceValues(forKeys: [.typeIdentifierKey]))?.typeIdentifier {
print(uti)
}
else {
print("UTI取得に失敗しました: \(argument)")
}
}
struct ContentView: View {
enum ShowView {
case Home
case HR_Graph
case HR_List
case HRV_Graph
case HRV_List
}
@State var displayMode = ShowView.Home
@State private var selectedDate_from = Date()
@State private var selectedDate_to = Date()
@State private var selection = 1
var body: some View {
if displayMode == ShowView.HR_Graph {
ContentView_HR_Graph()
} else if displayMode == ShowView.HR_List {
ContentView_HR_List()
} else if displayMode == ShowView.HRV_Graph {
ContentView_HRV_Graph()
} else if displayMode == ShowView.HRV_List {
ContentView_HRV_List()
}