MCPcopy
hub / github.com/putyy/res-downloader / openDirectoryDialog

Method openDirectoryDialog

core/http.go:167–179  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

165}
166
167func (h *HttpServer) openDirectoryDialog(w http.ResponseWriter, r *http.Request) {
168 folder, err := runtime.OpenDirectoryDialog(appOnce.ctx, runtime.OpenDialogOptions{
169 DefaultDirectory: "",
170 Title: "Select a folder",
171 })
172 if err != nil {
173 h.error(w, err.Error())
174 return
175 }
176 h.success(w, respData{
177 "folder": folder,
178 })
179}
180
181func (h *HttpServer) openFileDialog(w http.ResponseWriter, r *http.Request) {
182 filePath, err := runtime.OpenFileDialog(appOnce.ctx, runtime.OpenDialogOptions{

Callers 1

HandleApiFunction · 0.80

Calls 2

errorMethod · 0.95
successMethod · 0.95

Tested by

no test coverage detected