Android File Create createFileInFolder(File folder, String fileName)

Here you can find the source of createFileInFolder(File folder, String fileName)

Description

create File In Folder

Declaration

public static File createFileInFolder(File folder, String fileName)
            throws IOException 

Method Source Code

//package com.java2s;
import java.io.File;
import java.io.IOException;

public class Main {
    public static File createFileInFolder(File folder, String fileName)
            throws IOException {
        File file = removeableFile(folder, fileName);
        file.createNewFile();/*from   ww w .  ja  v  a 2  s  .c  o  m*/
        return file;
    }

    private static File removeableFile(File folder, String fileName) {
        File file = new File(folder, fileName);
        file.deleteOnExit();
        return file;
    }
}

Related

  1. createFile(String path)
  2. createFile(String path)
  3. createFile(String path, List content)
  4. createFile(String path, String content)
  5. createFile(String path, boolean isFile)
  6. createFileInFolder(File folder, String fileName)
  7. createIfNoExist(String path)
  8. createNewFile(File file)
  9. createNewFile(String filePath)