class FileHelper {

    public static boolean updateTimestamp(final String path, final boolean recursive) throws IOException {
        if (path == null || "".equals(path)) {
            return false;
        }
        if (!FileHelper.doesDirectoryOrFileExist(path)) {
            return false;
        }

        if (recursive) {
            Iterator<File> files = FileUtils.iterateFiles(new File(path), null, true);
            while (files.hasNext()) {
                File file = files.next();
                FileUtils.touch(file); // update date on file
                log.debug(new StringBuilder("Updated timestamp on file: ").append(file.getPath()).toString());
            }
        } else {
            FileUtils.touch(new File(path));
            log.debug(new StringBuilder("Updated timestamp on file: ").append(new File(path).getPath()).toString());
        }
        return true;
    }

}