Java Utililty Methods File Touch

List of utility methods to do File Touch

Description

The list of methods to do File Touch are organized into topic(s).

Method

voidtouchOrCrash(File f)
touch Or Crash
if (!f.exists()) {
    f.getParentFile().mkdirs();
    f.createNewFile();
if (!f.isFile())
    throw new RuntimeException("\"" + f.getAbsolutePath() + "\" must be a file. Aborting.");
voidtouchRecursive(File f, long timestamp)
touch Recursive
f.setLastModified(timestamp);
File parent = f.getParentFile();
if (parent != null)
    touchRecursive(parent, timestamp);