|
|
|
@@ -214,47 +214,6 @@ func GetOneLevelAllObjectUnderDirMinio(bucket string, prefixRootPath string, rel |
|
|
|
ParenDir: ParenDir, |
|
|
|
} |
|
|
|
fileInfos = append(fileInfos, fileInfo) |
|
|
|
|
|
|
|
// log.Info("val key=" + val.Key) |
|
|
|
// var isDir bool |
|
|
|
// var fileName string |
|
|
|
// if val.Key == Prefix { |
|
|
|
// continue |
|
|
|
// } |
|
|
|
|
|
|
|
// fileName = val.Key[prefixLen:] |
|
|
|
// log.Info("fileName =" + fileName) |
|
|
|
// files := strings.Split(fileName, "/") |
|
|
|
// if fileMap[files[0]] { |
|
|
|
// continue |
|
|
|
// } else { |
|
|
|
// fileMap[files[0]] = true |
|
|
|
// } |
|
|
|
// ParenDir := relativePath |
|
|
|
// fileName = files[0] |
|
|
|
// if len(files) > 1 { |
|
|
|
// isDir = true |
|
|
|
// ParenDir += fileName + "/" |
|
|
|
// } else { |
|
|
|
// isDir = false |
|
|
|
// } |
|
|
|
|
|
|
|
// // if strings.HasSuffix(val.Key, "/") { |
|
|
|
// // isDir = true |
|
|
|
// // fileName = val.Key[prefixLen : len(val.Key)-1] |
|
|
|
// // relativePath += val.Key[prefixLen:] |
|
|
|
// // } else { |
|
|
|
// // isDir = false |
|
|
|
// // fileName = val.Key[prefixLen:] |
|
|
|
// // } |
|
|
|
// fileInfo := FileInfo{ |
|
|
|
// ModTime: val.LastModified.Local().Format("2006-01-02 15:04:05"), |
|
|
|
// FileName: fileName, |
|
|
|
// Size: val.Size, |
|
|
|
// IsDir: isDir, |
|
|
|
// ParenDir: relativePath, |
|
|
|
// } |
|
|
|
// fileInfos = append(fileInfos, fileInfo) |
|
|
|
} |
|
|
|
return fileInfos, err |
|
|
|
} else { |
|
|
|
|