MCPcopy
hub / github.com/perkeep/perkeep / NewFileMap

Function NewFileMap

pkg/schema/schema.go:694–696  ·  view source on GitHub ↗

NewFileMap returns a new builder of a type "file" schema for the provided fileName. The chunk parts of the file are not populated.

(fileName string)

Source from the content-addressed store, hash-verified

692// NewFileMap returns a new builder of a type "file" schema for the provided fileName.
693// The chunk parts of the file are not populated.
694func NewFileMap(fileName string) *Builder {
695 return newCommonFilenameMap(fileName).SetType(TypeFile)
696}
697
698// NewDirMap returns a new builder of a type "directory" schema for the provided fileName.
699func NewDirMap(fileName string) *Builder {

Callers 12

UploadFileMethod · 0.92
searchDescribeSetupFunction · 0.92
TestPackerBoundarySplitsFunction · 0.92
UploadFileMethod · 0.92
populateFunction · 0.92
uploadNodeRegularFileMethod · 0.92
TestWriteFileMapFunction · 0.85
TestWriteThenReadFunction · 0.85
TestReaderSeekStressFunction · 0.85
TestReaderEfficiencyFunction · 0.85
TestReaderForeachChunkFunction · 0.85

Calls 2

newCommonFilenameMapFunction · 0.85
SetTypeMethod · 0.80

Tested by 8

searchDescribeSetupFunction · 0.74
TestPackerBoundarySplitsFunction · 0.74
populateFunction · 0.74
TestWriteFileMapFunction · 0.68
TestWriteThenReadFunction · 0.68
TestReaderSeekStressFunction · 0.68
TestReaderEfficiencyFunction · 0.68
TestReaderForeachChunkFunction · 0.68