Java BufferedWriter Write writeFilenames(String folderPath, LinkedList listOfPopulationFiles)

Here you can find the source of writeFilenames(String folderPath, LinkedList listOfPopulationFiles)

Description

write Filenames

License

Open Source License

Declaration

public static void writeFilenames(String folderPath, LinkedList<File> listOfPopulationFiles)
            throws IOException 

Method Source Code

//package com.java2s;

import java.io.BufferedWriter;
import java.io.File;

import java.io.FileWriter;
import java.io.IOException;

import java.util.LinkedList;

public class Main {
    public static void writeFilenames(String folderPath, LinkedList<File> listOfPopulationFiles)
            throws IOException {
        FileWriter filesFile = new FileWriter(folderPath + System.getProperty("file.separator") + "files.csv");
        BufferedWriter outFiles = new BufferedWriter(filesFile);
        outFiles.write("Filenames");
        outFiles.newLine();//from   www.ja v a  2 s .c  om
        for (int i = 0; i < listOfPopulationFiles.size(); i++) {
            outFiles.write(listOfPopulationFiles.get(i).getName().substring(0,
                    listOfPopulationFiles.get(i).getName().length() - 4));
            outFiles.newLine();
        }
        outFiles.close();
    }
}

Related

  1. writeFile(String outputLocation, String fileName, List content)
  2. writeFile(String p_name, String p_encoding, String p_content)
  3. writeFileAppend(String filePath, String content)
  4. writeFileContent(File audioFile, short[] data, boolean littleEndian)
  5. writeFileContents(File file, String contents)
  6. writeFileText(File file, String text)
  7. writeFileToString(String filePath, String fileContent, String encoding, boolean append)