Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
import java.io.*;
import java.util.*;
public class Kopy
{
public static void die(String str)
{
System.err.println(str);
System.exit(1);
}
public static void main(String args []) throws FileNotFoundException
{
String path = "home/tyteeye510/workspace/Kopy/src";
String path2 = "home/tyteeye510/workspace/Kopy/src"
File f = new File ( args [0]);
if (!f.exists()) die ("does not exist");
if (!f.canRead()) die ("can not read");
if (!f.isFile()) die ( "not a file");
Scanner sc = new Scanner(f);
String text;
PrintWriter pw = new PrintWriter(args [1]);
while(sc.hasNext())
{
text = sc.nextLine();
pw.println(text);
}
pw.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.