Touch.java Source code

Java tutorial

Introduction

Here is the source code for Touch.java

Source

import java.io.File;
import java.util.Date;

class Touch {
    public static void main(String[] args) {
        String[] names = new File(".").list();

        Date current = new Date();

        for (int i = 0; i < names.length; i++) {
            File f = new File(names[i]);
            f.setLastModified(current.getTime());
        }
    }
}