Created
March 22, 2017 10:12
-
-
Save JorgeCanellas/fbec5157c57ad49ab7b238349b30e4db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.lang.reflect.ParameterizedType; | |
import java.nio.charset.Charset; | |
import java.nio.file.DirectoryStream; | |
import java.nio.file.FileSystems; | |
import java.nio.file.Path; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.nio.file.Files; | |
public class HashCodeMain { | |
public static void main(String[] args) throws IOException { | |
Path results_folder = FileSystems.getDefault().getPath(System.getProperty("user.dir"), "results"); | |
Files.createDirectories(results_folder); | |
Path inputs_folder = FileSystems.getDefault().getPath(System.getProperty("user.dir"), "src", "Resources"); | |
DirectoryStream<Path> inputs_stream = Files.newDirectoryStream(inputs_folder, filter); | |
for (Path path : inputs_stream) { | |
Path out_path = results_folder.resolve(path.getFileName().toString().replace(".in", ".out")); | |
optimize_file(path, out_path); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment