<commit_before>package maildir

import (
	"bds/lib/mailstore"
	"crypto/rand"
	"fmt"
	log "github.com/Sirupsen/logrus"
	"io"
	"os"
	"path/filepath"
	"time"
)

// maildir mailbox protocol
type MailDir string

// get absolute filepath for this maildir
func (d MailDir) Filepath() (str string) {
	str, _ = filepath.Abs(string(d))
	return
}

// ensure the maildir is well formed
func (d MailDir) Ensure() (err error) {
	dir := d.Filepath()
	_, err = os.Stat(dir)
	if os.IsNotExist(err) {
		// create main directory
		err = os.Mkdir(dir, 0700)<commit_msg>mkdir -> mkdirall<commit_after>package maildir

import (
	"bds/lib/mailstore"
	"crypto/rand"
	"fmt"
	log "github.com/Sirupsen/logrus"
	"io"
	"os"
	"path/filepath"
	"time"
)

// maildir mailbox protocol
type MailDir string

// get absolute filepath for this maildir
func (d MailDir) Filepath() (str string) {
	str, _ = filepath.Abs(string(d))
	return
}

// ensure the maildir is well formed
func (d MailDir) Ensure() (err error) {
	dir := d.Filepath()
	_, err = os.Stat(dir)
	if os.IsNotExist(err) {
		// create main directory
		err = os.MkdirAll(dir, 0700)
{'fraction_non_alphanumeric': 0.1411764705882353, 'fraction_numerical': 0.007239819004524887, 'mean_word_length': 3.8086956521739133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6487601', 'n_tokens_mistral': 447, 'n_tokens_neox': 436, 'n_words': 114}