From d7bc6feff9725df501164692e36e9fcf8b4eb7d3 Mon Sep 17 00:00:00 2001 From: Marco Kittel Date: Sun, 22 Jun 2025 20:28:38 +0200 Subject: [PATCH] =?UTF-8?q?CreateDir=20zu=20Tools=20hinzugef=C3=BCgt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/tools.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tools.go b/tools/tools.go index 19d6df1..dc9e03c 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -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)