package com.mindprod.example;
import com.mindprod.common18.EIO;
import java.io.File;
import java.io.IOException;
import static java.lang.System.*;
/**
* combining two filenames with java.io.File.
*
* @author Roedy Green, Canadian Mind Products
* @version 1.0 2013-03-16 initial version
* @since 2013-03-16
*/
public final class TestFileCombine
{
/**
* Experiment with various ways of combining file names
*
* @param args not used
*
* @throws java.io.IOException on I/O failure.
*/
public static void main( String[] args ) throws IOException
{
File root = new File( "E:/mindprod" );
File o1 = new File( root, "index.html" );
out.println( EIO.getCanOrAbsPath( o1 ) );
File o2 = new File( root, "/index.html" );
out.println( EIO.getCanOrAbsPath( o2 ) );
File base = new File( "E:/mindprod/jgloss/encoding" );
File o3 = new File( base, "pad.html" );
out.println( EIO.getCanOrAbsPath( o3 ) );
File o4 = new File( base, "../pad.html" );
out.println( EIO.getCanOrAbsPath( o4 ) );
File o5 = new File( base, "/jgloss/pad.html" );
out.println( EIO.getCanOrAbsPath( o5 ) );
File base2 = new File( "E:/mindprod/jgloss/encoding/utf8.html" );
File o6 = new File( base2, "pad.html" );
out.println( EIO.getCanOrAbsPath( o6 ) );
File o7 = new File( base2, "../pad.html" );
out.println( EIO.getCanOrAbsPath( o7 ) );
File o8 = new File( base2, "/jgloss/pad.html" );
out.println( EIO.getCanOrAbsPath( o8 ) );
}
}