INNER CODE UNIT · Go
exportedDir
dundee/gdu · report/export.go:172
func exportedDir(dir fs.Item) *analyze.Dir {
return &analyze.Dir{
File: &analyze.File{
Name: dir.GetName(),
Flag: dir.GetFlag(),
Mtime: dir.GetMtime(),
Size: dir.GetSize(),
Usage: dir.GetUsage(),
},
BasePath: filepath.Dir(dir.GetPath()),
ItemCount: dir.GetItemCount(),
}
}
// exportedFile copies the attributes of a file the export can emit, reading
// them through the fs.Item interface for the same reason as exportedDir.
func exportedFile(file, parent fs.Item) *analyze.File {
copied := &analyze.File{