public static void touch(Resource res) throws IOException {
  if (res.exists()) {
    res.setLastModified(System.currentTimeMillis());
  }
 else {
    res.createFile(true);
  }
}

public static void touch ( Resource res ) throws IOException { if ( res . exists ( ) ) { res . setLastModified ( System . currentTimeMillis ( ) ) ; } else { res . createFile ( true ) ; } }
similat to linux bash fuction toch , create file if not exist oherwise change last modified date
