MCPcopy Create free account
hub / github.com/devld/go-drive / NewTempFile

Function NewTempFile

script/object_io.go:33–41  ·  view source on GitHub ↗
(vm *VM)

Source from the content-addressed store, hash-verified

31}
32
33func NewTempFile(vm *VM) TempFile {
34 f, e := os.CreateTemp("", "go-drive-script-temp-")
35 if e != nil {
36 vm.ThrowError(e)
37 }
38 tf := TempFile{NewReader(vm, f), f}
39 vm.PutDisposable(tf)
40 return tf
41}
42
43func GetReader(v any) io.Reader {
44 switch v := v.(type) {

Callers 1

initVarsForVmFunction · 0.70

Calls 3

NewReaderFunction · 0.85
ThrowErrorMethod · 0.80
PutDisposableMethod · 0.80

Tested by

no test coverage detected