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

Function valueToScriptEntryStruct

drive/script/index.go:238–254  ·  view source on GitHub ↗
(v *s.Value)

Source from the content-addressed store, hash-verified

236}
237
238func valueToScriptEntryStruct(v *s.Value) *scriptEntryStruct {
239 meta := types.EntryMeta{Readable: true, Writable: true}
240
241 metaV := v.Get("Meta")
242 if !metaV.IsNil() {
243 metaV.ParseInto(&meta)
244 }
245
246 return &scriptEntryStruct{
247 Meta: meta,
248 IsDir: v.Get("IsDir").Bool(),
249 Path: v.Get("Path").String(),
250 Size: v.Get("Size").Integer(),
251 ModTime: v.Get("ModTime").Integer(),
252 Data: v.Get("Data").SM(),
253 }
254}
255
256type scriptEntryStruct struct {
257 Path string

Callers 1

valueToEntryMethod · 0.85

Calls 7

IsNilMethod · 0.80
ParseIntoMethod · 0.80
IntegerMethod · 0.80
SMMethod · 0.80
GetMethod · 0.65
StringMethod · 0.65
BoolMethod · 0.45

Tested by

no test coverage detected