CreateDir zu Tools hinzugefügt.
This commit is contained in:
parent
42e0ed4d33
commit
d7bc6feff9
|
|
@ -2,11 +2,16 @@ package tools
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"io/fs"
|
||||
"os"
|
||||
"regexp"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Createdir(path string, rights fs.FileMode) error {
|
||||
return os.Mkdir(path, rights)
|
||||
}
|
||||
|
||||
func IsFilenameValid(filename string) bool {
|
||||
pattern := `^20[2-9][0-9]-(0[1-9]|1[0-2])-(0[0-9]|1[0-9]|2[0-9]|3[0-1])T(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]:[0-5][0-9])((\+00:00)|(\-00:00)|(\-0[3,9]:30)|(\-1[0-2]:00)|(-0[0-9]:00)|(\+0[0-9]:00)|(\+0[09,03,04,05,06]:30)|(\+10:30)|(\+1[0-4]:00)|(\+0[5,8]:45)|(\+12:45))-(CH|DE|EU|AT)-(stock|delivery).csv$`
|
||||
re := regexp.MustCompile(pattern)
|
||||
|
|
|
|||
Loading…
Reference in New Issue