MCPcopy Create free account
hub / github.com/cli/cli / IsShortcutFile

Function IsShortcutFile

pkg/cmd/issue/artifact/shared/content.go:50–52  ·  view source on GitHub ↗

IsShortcutFile reports whether path is an Internet Shortcut file, which artifact commands read as a link. Like Windows, it goes by the .url extension, in any case.

(path string)

Source from the content-addressed store, hash-verified

48// artifact commands read as a link. Like Windows, it goes by the .url
49// extension, in any case.
50func IsShortcutFile(path string) bool {
51 return strings.EqualFold(filepath.Ext(path), ".url")
52}
53
54// IsHTMLFile reports whether path is an HTML file, which create reads as an
55// HTML document. It goes by the .html and .htm extensions, in any case.

Callers 4

isLinkMethod · 0.92
readSourceFunction · 0.92
newBodyFunction · 0.92
TestIsShortcutFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsShortcutFileFunction · 0.68