MCPcopy Index your code
hub / github.com/jetify-com/devbox / isArchive

Function isArchive

nix/flake/flakeref.go:498–508  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

496}
497
498func isArchive(path string) bool {
499 // As documented under the tarball type:
500 // https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake#types
501 return strings.HasSuffix(path, ".tar") ||
502 strings.HasSuffix(path, ".tar.gz") ||
503 strings.HasSuffix(path, ".tgz") ||
504 strings.HasSuffix(path, ".tar.xz") ||
505 strings.HasSuffix(path, ".tar.zst") ||
506 strings.HasSuffix(path, ".tar.bz2") ||
507 strings.HasSuffix(path, ".zip")
508}
509
510// splitPathOrOpaque splits a URL path by '/'. If the path is empty, it splits
511// the opaque instead. Splitting happens before unescaping the path or opaque,

Callers 1

parseURLRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected