package com.tutego.insel.io.file;

import java.io.*;

public class Touch
{
  public static void main( String[] args )
  {
    for ( String s : args )
    {
      File f = new File( s );

      if ( f.exists() )
      {
        if ( f.setLastModified( System.currentTimeMillis() ) )
          System.out.println( "touched " + s );
        else
          System.out.println( "touch failed on " + s );
      }
      else
      {
        try
        {
          f.createNewFile();
          System.out.println( "create new file " + s );
        } catch ( IOException e ) { e.printStackTrace(); }
      }
    }
  }
}
