public static void touch ( File ... files ) throws IOException { long now = System . currentTimeMillis ( ) ; for ( File f : files ) { if ( ! f . createNewFile ( ) && ! f . setLastModified ( now ) ) { throw new IOException ( "Failed to touch " + f ) ; } } }
Creates empty files at the specified paths or updates the last modification time of the files at the specified paths . Named after the Unix command of the same name .