Files
AynaLivePlayer/provider/local_test.go
2022-07-07 00:44:10 -07:00

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())
}
}
}