Java Path File List nio toFile(Path file, String list)

Here you can find the source of toFile(Path file, String list)

Description

to File

License

Open Source License

Declaration

public static void toFile(Path file, String list) throws IOException 

Method Source Code


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

import java.nio.file.Path;

import java.io.FileOutputStream;
import java.io.IOException;

public class Main {
    public static void toFile(Path file, String list) throws IOException {
        FileOutputStream fos = null;
        try {/*from   w w w  . j  av a 2s .  com*/
            fos = new FileOutputStream(file.toString());
            fos.write(list.getBytes());
            fos.flush();
        } finally {
            if (fos != null)
                fos.close();
        }
    }
}

Related

  1. recursiveListFiles(Path file)
  2. recusivelyCollectFileListing(ArrayList rc, Path base, Path directory)
  3. registerRecursive(final WatchService watcher, final List startingPaths)
  4. retrieveTokenFilesInDirImportableFrom(Path dir, List excludedTokenFiles)
  5. toCliString(Path agentPath, String param)
  6. uncheckedList(final Path path)
  7. validateAndAdd(Path path, String expression, LinkedList files)