MCPcopy Create free account
hub / github.com/go-git/go-billy / TempFile

Method TempFile

fs.go:100–100  ·  view source on GitHub ↗

TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the resulting *os.File. If dir is the empty string, TempFile uses the default directory for temporary files (see os.TempDir). Multiple programs calling Te

(dir, prefix string)

Source from the content-addressed store, hash-verified

98 // It is the caller's responsibility to remove the file when no longer
99 // needed.
100 TempFile(dir, prefix string) (File, error)
101}
102
103// Dir abstract the dir related operations in a storage-agnostic interface as

Callers 14

TestTempFileFunction · 0.65
TestTempFileMethod · 0.65
TestTempFileWithPathMethod · 0.65
TestRemoveTempFileMethod · 0.65
TestRenameTempFileMethod · 0.65
TestTempFileManyMethod · 0.65
TestTempFileMethod · 0.65
TestTempFileWithBasicMethod · 0.65
TempFileMethod · 0.65

Implementers 7

BoundOSosfs/os_bound.go
ChrootOSosfs/os_chroot.go
TempFileMocktest/mock.go
Memorymemfs/memory.go
Temporalhelper/temporal/temporal.go
ChrootHelperhelper/chroot/chroot.go
Polyfillhelper/polyfill/polyfill.go

Calls

no outgoing calls

Tested by 6

TestTempFileFunction · 0.52
TestTempFileMethod · 0.52
TestTempFileWithBasicMethod · 0.52
TestTempFileMethod · 0.52