MCPcopy Create free account
hub / github.com/couchbase/moss / ToOsFile

Function ToOsFile

file.go:146–154  ·  view source on GitHub ↗

ToOsFile provides the underlying os.File for a File, if available.

(f File)

Source from the content-addressed store, hash-verified

144
145// ToOsFile provides the underlying os.File for a File, if available.
146func ToOsFile(f File) *os.File {
147 if osFile, ok := f.(*os.File); ok {
148 return osFile
149 }
150 if osFile2, ok := f.(OsFile); ok {
151 return osFile2.OsFile()
152 }
153 return nil
154}
155
156// --------------------------------------------------------
157

Callers 2

TestFileRefFunction · 0.85
doLoadSegmentsMethod · 0.85

Calls 1

OsFileMethod · 0.80

Tested by 1

TestFileRefFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…