12345678910111213141516171819202122232425262728293031 |
- //go:build windows
- package yu_file
- import (
- "fmt"
- "testing"
- "time"
- )
- func TestGetS(t *testing.T) {
- fmt.Println(GetS("C:\\Users\\Administrator\\Desktop\\awesomeProject\\go.mod"))
- fmt.Println(SetS("C:\\Users\\Administrator\\Desktop\\awesomeProject\\build.txt", "1sadasdasd"))
- fmt.Println(LinesS("C:\\Users\\Administrator\\Desktop\\awesomeProject\\build.txt", "\r\n"))
- for i := 0; i < 300; i++ {
- go func() {
- for i := 0; i < 1000; i++ {
- PutS("C:\\Users\\Administrator\\Desktop\\122\\111.txt", "sadsadasdsdad", "\r\n")
- }
- }()
- }
- time.Sleep(time.Second * 30)
- }
- func TestFind_Enum(t *testing.T) {
- j_find := NewFind().SetPath(`C:\Users\Administrator\Desktop\`).SetName("*")
- fmt.Println(j_find.Enum())
- j_find.SetName("*.zip")
- fmt.Println(j_find.Enum())
- }
|