Skip to content

Instantly share code, notes, and snippets.

@bbchriscesar
Created May 30, 2019 15:58
Show Gist options
  • Select an option

  • Save bbchriscesar/55981899498b8a562572b108e0aa0bf5 to your computer and use it in GitHub Desktop.

Select an option

Save bbchriscesar/55981899498b8a562572b108e0aa0bf5 to your computer and use it in GitHub Desktop.
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class Main {
public static void main(String[] args) throws Exception {
// write your code here
String [] locales = {"en-US", "en-GB", "pt-PT", "pt-BR"};
for (String locale : locales){
String dir = "/Users/christiannec/Documents/JavaOutput/" + locale;
Path path = Paths.get(dir);
if (!Files.exists(path)) {
Files.createDirectory(path);
}
System.out.println(locale);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment