Files
SingboxForPanel/experimental/clashapi/server_fs.go
CN-JS-HuiBai 9f867b19da First Commmit
2026-04-14 22:41:14 +08:00

19 lines
287 B
Go

package clashapi
import "net/http"
type Dir http.Dir
func (d Dir) Open(name string) (http.File, error) {
file, err := http.Dir(d).Open(name)
if err != nil {
return nil, err
}
return &fileWrapper{file}, nil
}
// workaround for #2345 #2596
type fileWrapper struct {
http.File
}