github.com/qjfoidnh/BaiduPCS-Go@v0.0.0-20231011165705-caa18a3765f3/pcsutil/file_test.go (about)

     1  package pcsutil_test
     2  
     3  import (
     4  	"fmt"
     5  	"github.com/qjfoidnh/BaiduPCS-Go/pcsutil"
     6  	"testing"
     7  )
     8  
     9  func TestWalkDir(t *testing.T) {
    10  	files, err := pcsutil.WalkDir("/Users/syy/tmp", "")
    11  	if err != nil {
    12  		t.Fatal(err)
    13  	}
    14  	for _, file := range files {
    15  		fmt.Println(file)
    16  	}
    17  }