2022-10-25 04:55:00 +00:00
|
|
|
package libbox
|
|
|
|
|
2023-03-01 02:37:47 +00:00
|
|
|
import (
|
|
|
|
C "github.com/sagernet/sing-box/constant"
|
|
|
|
|
|
|
|
"github.com/dustin/go-humanize"
|
|
|
|
)
|
2022-10-25 04:55:00 +00:00
|
|
|
|
|
|
|
func SetBasePath(path string) {
|
|
|
|
C.SetBasePath(path)
|
|
|
|
}
|
2023-02-22 12:52:57 +00:00
|
|
|
|
2023-04-09 04:39:26 +00:00
|
|
|
func SetTempPath(path string) {
|
|
|
|
C.SetTempPath(path)
|
|
|
|
}
|
|
|
|
|
2023-02-22 12:52:57 +00:00
|
|
|
func Version() string {
|
|
|
|
return C.Version
|
|
|
|
}
|
2023-03-01 02:37:47 +00:00
|
|
|
|
|
|
|
func FormatBytes(length int64) string {
|
2023-03-16 03:15:55 +00:00
|
|
|
return humanize.IBytes(uint64(length))
|
2023-03-01 02:37:47 +00:00
|
|
|
}
|