gitlab.com/evatix-go/core@v1.3.55/chmodhelper/CreateDirFilesWithRwxPermission.go (about) 1 package chmodhelper 2 3 func CreateDirFilesWithRwxPermission( 4 isRemoveAllDirBeforeCreate bool, 5 dirFilesWithRwxPermission *DirFilesWithRwxPermission, 6 ) error { 7 fileMode, fileModeErr := ParseRwxOwnerGroupOtherToFileMode( 8 &dirFilesWithRwxPermission.ApplyRwx) 9 10 if fileModeErr != nil { 11 return fileModeErr 12 } 13 14 err := CreateDirWithFiles( 15 isRemoveAllDirBeforeCreate, 16 fileMode, 17 &dirFilesWithRwxPermission.DirWithFiles) 18 19 if err != nil { 20 return err 21 } 22 23 return nil 24 }