MCPcopy Index your code
hub / github.com/sourcegraph/checkup / fullPathName

Method fullPathName

storage/github/github.go:96–102  ·  view source on GitHub ↗

fullPathName ensures the configured Dir value is present in the filename and returns a filename with the Dir prefixed before the input filename if necessary.

(filename string)

Source from the content-addressed store, hash-verified

94// fullPathName ensures the configured Dir value is present in the filename and
95// returns a filename with the Dir prefixed before the input filename if necessary.
96func (gh *Storage) fullPathName(filename string) string {
97 if strings.HasPrefix(filename, gh.Dir) {
98 return filename
99 } else {
100 return filepath.Join(gh.Dir, filename)
101 }
102}
103
104// readFile reads a file from the Git repository at its latest revision.
105// This method returns the plaintext contents, the SHA associated with the contents

Callers 3

readFileMethod · 0.95
writeFileMethod · 0.95
deleteFileMethod · 0.95

Implementers 5

fakecheckup_test.go
Storagestorage/sql/sql.go
Storagestorage/s3/s3.go
Storagestorage/github/github.go
Storagestorage/fs/fs.go

Calls

no outgoing calls

Tested by

no test coverage detected