break
}
}
- return statSegDir, dirName(name), dir.directoryType
+ return statSegDir, name, dir.directoryType
}
func (ss *statSegmentV1) GetEpoch() (int64, bool) {
func (ss *statSegmentV1) CopyEntryData(segment dirSegment, _ uint32) adapter.Stat {
dirEntry := (*statSegDirectoryEntryV1)(segment)
- dirType := adapter.StatType(dirEntry.directoryType)
+ typ := getStatType(dirEntry.directoryType, true)
- switch dirType {
- case statDirScalarIndex:
+ switch typ {
+ case adapter.ScalarIndex:
return adapter.ScalarStat(dirEntry.unionData)
- case statDirErrorIndex:
+ case adapter.ErrorIndex:
if dirEntry.unionData == 0 {
debugf("offset invalid for %s", dirEntry.name)
break
}
return adapter.ErrorStat(errData)
- case statDirCounterVectorSimple:
+ case adapter.SimpleCounterVector:
if dirEntry.unionData == 0 {
debugf("offset invalid for %s", dirEntry.name)
break
}
return adapter.SimpleCounterStat(data)
- case statDirCounterVectorCombined:
+ case adapter.CombinedCounterVector:
if dirEntry.unionData == 0 {
debugf("offset invalid for %s", dirEntry.name)
break
}
return adapter.CombinedCounterStat(data)
- case statDirNameVector:
+ case adapter.NameVector:
if dirEntry.unionData == 0 {
debugf("offset invalid for %s", dirEntry.name)
break
}
return adapter.NameStat(data)
- case statDirEmpty:
+ case adapter.Empty:
// no-op
- case statDirSymlink:
+ case adapter.Symlink:
debugf("Symlinks are not supported for stats v1")
default: