MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / trashInfoToDTO

Function trashInfoToDTO

agent/app/service/recycle_bin.go:412–423  ·  view source on GitHub ↗
(entryName, filesDir string, info *trashInfo)

Source from the content-addressed store, hash-verified

410}
411
412func trashInfoToDTO(entryName, filesDir string, info *trashInfo) *response.RecycleBinDTO {
413 return &response.RecycleBinDTO{
414 Name: path.Base(info.Path),
415 Size: clampToInt(info.Size),
416 Type: "file",
417 DeleteTime: info.DeletionDate,
418 RName: entryName,
419 SourcePath: info.Path,
420 IsDir: info.IsDir,
421 From: filesDir,
422 }
423}
424
425func loadRecycleBinDTO(from, name string) (*response.RecycleBinDTO, error) {
426 if path.Base(from) == recycleBinFilesSubdir {

Callers 2

buildTrashDTOFunction · 0.85
loadRecycleBinDTOFunction · 0.85

Calls 1

clampToIntFunction · 0.85

Tested by

no test coverage detected