mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-11 20:58:13 +08:00
26 lines
452 B
Go
26 lines
452 B
Go
package provider
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"testing"
|
|
)
|
|
|
|
func TestLocal_Read(t *testing.T) {
|
|
items, _ := ioutil.ReadDir(".")
|
|
for _, item := range items {
|
|
if item.IsDir() {
|
|
subitems, _ := ioutil.ReadDir(item.Name())
|
|
for _, subitem := range subitems {
|
|
if !subitem.IsDir() {
|
|
// handle file there
|
|
fmt.Println(item.Name() + "/" + subitem.Name())
|
|
}
|
|
}
|
|
} else {
|
|
// handle file there
|
|
fmt.Println(item.Name())
|
|
}
|
|
}
|
|
}
|