I am writing a backup class, the full() method should delete what's in the destination and recreate everything.
When the destination directory is empty and I run it, it works fine.
If the destination isn't empty, it deletes the contents, creates the root directory which will then contain all the subdirectories.
It works properly if the destination folder is not modified, if a folder is added to it, but if a file is added and you then run full(), (which should delete everything, including the newly created file, and they copy the contents of the source), it gives the following message whenever it tries to create a file(but not a directory): java.io.IOException: Access is denied
I think it might have something to do with the createNewFile() method.
Please find below the code for the Backup.java class
*Code tags added for easier reading -- Jason*
[ March 18, 2004: Message edited by: jason adam ]