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