<commit_before>package it.uniroma1.lcl.dietrolequinte.loader;

import java.io.File;
import java.util.List;

public class Loader {
	
	private String directory;
	private File fileDirectory;
	private List<AbstractLoader> loaders;
	
	
	/**
	 * @param directory
	 */
	public Loader(String directory) {
		
		this.directory = directory;
		fileDirectory = new File(directory);
		if(!fileDirectory.exists()) {
		
		}
	}
	
	/**
	 * @return
	 */
	public String getDirectory() {
		return directory;
	}
	
	
	<commit_msg>Added DirectoryNotFoundException, NotADirectoryException, EmptyDirectoryException management in Loader.java's constructor<commit_after>package it.uniroma1.lcl.dietrolequinte.loader;

import java.io.File;
import java.util.List;

import it.uniroma1.lcl.dietrolequinte.exception.DirectoryNotFoundException;
import it.uniroma1.lcl.dietrolequinte.exception.EmptyDirectoryException;
import it.uniroma1.lcl.dietrolequinte.exception.NotADirectoryException;

public class Loader {
	
	private String directory;
	private File fileDirectory;
	private List<AbstractLoader> loaders;
	
	
	/**
	 * @param directory
	 * @throws DirectoryNotFoundException 
	 * @throws NotADirectoryException 
	 * @throws EmptyDirectoryException 
	 */
	public Loader(String directory) throws DirectoryNotFoundException, NotADirectoryException, EmptyDirectoryException {
		
		this.directory = directory;
		fileDirectory = new File(directory);
		if(!fileDirectory.exists()) {
			
			throw new DirectoryNotFoundException();
		
		}
		if(fileDirectory.isFile()) {
			throw new NotADirectoryException();
		}
		if(fileDirectory.list().length == 0) {
			throw new EmptyDirectoryException();
		}
	}
	
	/**
	 * @return
	 */
	public String getDirectory() {
		return directory;
	}
	
	
	
{'fraction_non_alphanumeric': 0.09851088201603665, 'fraction_numerical': 0.003436426116838488, 'mean_word_length': 4.4937106918239, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '975422', 'n_tokens_mistral': 587, 'n_tokens_neox': 497, 'n_words': 105}