MCPcopy Create free account
hub / github.com/bodgit/sevenzip / split

Function split

reader.go:742–757  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

740}
741
742func split(name string) (dir, elem string) {
743 if len(name) > 0 && name[len(name)-1] == '/' {
744 name = name[:len(name)-1]
745 }
746
747 i := len(name) - 1
748 for i >= 0 && name[i] != '/' {
749 i--
750 }
751
752 if i < 0 {
753 return ".", name
754 }
755
756 return name[:i], name[i+1:]
757}
758
759//nolint:gochecknoglobals
760var dotFile = &fileListEntry{name: "./", isDir: true}

Callers 4

NameMethod · 0.85
fileEntryLessFunction · 0.85
openLookupMethod · 0.85
openReadDirMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…