package loader;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class file
{
BufferedReader input;
public file( final String[] dirs, final String file ) throws FileNotFoundException
{
input = new BufferedReader( new FileReader( relative_path( dirs, file ) ) );
}
public file( final String file ) throws FileNotFoundException
{
input = new BufferedReader( new FileReader( file ) );
}
public void close() throws IOException
{
input.close();
}
public String read_line() throws IOException
{
return input.readLine();
}
public static String relative_path( final String[] dirs )
{
return _path( dirs );
}
public static String relative_path( final String[] dirs, final String file )
{
return _path( dirs ) + file;
}
private static String _path( final String[] paths )
{
String res = "";
for ( final String s : paths ) {
res += s + File.separator;
}
return res;
}
}
|