MCPcopy Create free account
hub / github.com/53AI/53AIHub / convertMCPBatchFileStructure

Function convertMCPBatchFileStructure

api/controller/mcp_batch_upload.go:112–127  ·  view source on GitHub ↗
(items []MCPBatchFileStructureItem)

Source from the content-addressed store, hash-verified

110}
111
112func convertMCPBatchFileStructure(items []MCPBatchFileStructureItem) []core.FileStructureItem {
113 if len(items) == 0 {
114 return []core.FileStructureItem{}
115 }
116 result := make([]core.FileStructureItem, 0, len(items))
117 for _, item := range items {
118 result = append(result, core.FileStructureItem{
119 RelativePath: item.RelativePath,
120 Size: item.Size,
121 IsDirectory: item.IsDirectory,
122 ParentPath: item.ParentPath,
123 Depth: item.Depth,
124 })
125 }
126 return result
127}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected