Compare commits
No commits in common. "230202aa0a54e108d6ee00319ca5c925616f53f2" and "d4a351a4e295231d2f23122bf1a2e6966a6e9eea" have entirely different histories.
230202aa0a
...
d4a351a4e2
@ -1,9 +1,8 @@
|
|||||||
import java.io.File;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
import java.sql.Array;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
@ -200,20 +199,16 @@ public class Data {
|
|||||||
/**
|
/**
|
||||||
* The method writeData writes the data of a List into a txt file.
|
* The method writeData writes the data of a List into a txt file.
|
||||||
*
|
*
|
||||||
* @author Felix Wöstemeyer
|
|
||||||
*
|
|
||||||
* @param pathWrite determines the filename of the file that will be written
|
* @param pathWrite determines the filename of the file that will be written
|
||||||
* @param listToWrite determines which ArrayList is to be used for writing the file
|
* @param listToWrite determines which ArrayList is to be used for writing the file
|
||||||
*/
|
*/
|
||||||
public void writeData(String pathWrite, ArrayList<String> listToWrite) {
|
public void writeData(String pathWrite, ArrayList<String> listToWrite) {
|
||||||
try {
|
if (pathWrite.equals("users.txt")) {
|
||||||
if (new File(pathWrite).exists()) {
|
|
||||||
for (String zeile : listToWrite) {
|
} else if (pathWrite.equals("orders.txt")) {
|
||||||
new FileWriter(pathWrite).write(zeile);
|
|
||||||
}
|
} else if (pathWrite.equals("menue.txt")){
|
||||||
}
|
|
||||||
}catch(IOException e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user