Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 16 of 16

Thread: Copying a File

  1. #16
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm afraid I don't have an answer for your first question. If it does not affect the way that the program executes, then I don't care at this point. (no offense).

    The test conditions that I provided are supposed to cause an exception in the program per the exceptions listed under commandParser method. For instance, if the user enters java FileCopy sourceFileName.txt to sourceFileName.txt an error should occur. I did fix all of the compares involving strings (= or == to .equals or !xx.equals). Wasn't thinking...

    I guess by calling the commandParser() method in the main, it would evaluate the syntax of the command line, would it not? I just don't know how to implement that. Would it apply to the copy object as in

    FileCopy copy = new FileCopy(srcFileName, dstFileName);
    copy.commandParser(args);

    Is that incorrect though?
    Last edited by OldBlue; 10-26-2012 at 09:56 PM.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •