MCPcopy Create free account
hub / github.com/cogentcore/core / openFileDefault

Method openFileDefault

filetree/file.go:44–47  ·  view source on GitHub ↗

openFileDefault opens file with default app for that file type (os defined) runs open on Mac, xdg-open on Linux, and start on Windows

()

Source from the content-addressed store, hash-verified

42// openFileDefault opens file with default app for that file type (os defined)
43// runs open on Mac, xdg-open on Linux, and start on Windows
44func (fn *Node) openFileDefault() error {
45 core.TheApp.OpenURL("file://" + string(fn.Filepath))
46 return nil
47}
48
49// duplicateFiles makes a copy of selected files
50func (fn *Node) duplicateFiles() { //types:add

Callers 1

OpenFilesDefaultMethod · 0.80

Calls 1

OpenURLMethod · 0.65

Tested by

no test coverage detected