mirror of
https://github.com/nitezs/sub2clash.git
synced 2024-12-24 11:34:42 -05:00
17 lines
206 B
Go
17 lines
206 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func MKDir(dir string) error {
|
|
if _, err := os.Stat(dir); os.IsNotExist(err) {
|
|
err := os.MkdirAll(dir, os.ModePerm)
|
|
if err != nil {
|
|
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|