package speiger.src.coreengine.utils.io.finders;

import java.io.File;
import java.util.StringJoiner;

import speiger.src.collections.objects.lists.ObjectList;
import speiger.src.collections.objects.sets.ObjectOrderedSet;

public interface IFileFinder
{
	public static final int FILE = 0;
	public static final int MULTI_FILE = 1;
	public static final int FOLDER = 2;
	public static final int ANY = 4;
	public static final int SAVE = 8;
	
	public ObjectList<File> build(int flags, String startPath, ObjectOrderedSet<String> validFormats, String description);
	
	public default String toFileFormat(ObjectOrderedSet<String> validFormats)  {
		StringJoiner joiner = new StringJoiner(",");
		for(String s : validFormats) joiner.add(s);
		return joiner.toString();
	}
}
