|
|
@ -113,7 +113,6 @@ func (f *FileInfo) search(search string, count int) (files []FileSearchInfo, tot
|
|
|
|
scanner := bufio.NewScanner(output)
|
|
|
|
scanner := bufio.NewScanner(output)
|
|
|
|
for scanner.Scan() {
|
|
|
|
for scanner.Scan() {
|
|
|
|
line := scanner.Text()
|
|
|
|
line := scanner.Text()
|
|
|
|
fmt.Println(line)
|
|
|
|
|
|
|
|
info, err := os.Stat(line)
|
|
|
|
info, err := os.Stat(line)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
continue
|
|
|
|
continue
|
|
|
@ -159,8 +158,6 @@ func (f *FileInfo) listChildren(dir, showHidden, containSub bool, search string,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
f.ItemTotal = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var items []*FileInfo
|
|
|
|
var items []*FileInfo
|
|
|
|
for _, df := range files {
|
|
|
|
for _, df := range files {
|
|
|
|
if dir && !df.IsDir() {
|
|
|
|
if dir && !df.IsDir() {
|
|
|
@ -222,7 +219,9 @@ func (f *FileInfo) listChildren(dir, showHidden, containSub bool, search string,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
items = append(items, file)
|
|
|
|
items = append(items, file)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if containSub {
|
|
|
|
f.ItemTotal = total
|
|
|
|
f.ItemTotal = total
|
|
|
|
|
|
|
|
}
|
|
|
|
start := (page - 1) * pageSize
|
|
|
|
start := (page - 1) * pageSize
|
|
|
|
end := pageSize + start
|
|
|
|
end := pageSize + start
|
|
|
|
var result []*FileInfo
|
|
|
|
var result []*FileInfo
|
|
|
|