Java File Touch touch(final File f)

Here you can find the source of touch(final File f)

Description

touch

License

Open Source License

Declaration

public static final void touch(final File f) throws java.io.FileNotFoundException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;
import java.io.PrintWriter;

public class Main {
    public static final void touch(final File f) throws java.io.FileNotFoundException {
        PrintWriter writer = new PrintWriter(f);
        writer.println("x");
        writer.flush();//from w w  w.  ja  va 2 s. c  o m
        writer.close();
    }
}

Related

  1. touch(File file)
  2. touch(File file)
  3. touch(File file, boolean createIfNeeded)
  4. touch(FileFilter filter, File root, boolean recurse)
  5. touch(final File f)
  6. touch(final File file)
  7. touch(final File file)
  8. touch(final File folder, final String fileName)
  9. touch(String _filename)