I am looking for code snippets/methods/classes that will help me do several things (several different classes and methods are needed)
This is in java, and I would like to keep it in java
What needs to be done:
- Create external folders (possible on another drive, under directories in the %appdata% folder)
- Copy files, sending different file types and names to different folders
- Detect if certain folders exist
- Create new folders
- Delete files inside of a .jar/delete files (either works)
- Delete the contents of a folder
I am looking for the classes and methods I need to achieve these goals. It would also help to have some example method calls.
I think java.io.File would satisfy most of those requirements. See also Apache Commons FileUtils for a higher-level interface to the file system.
java.util.jar will satisfy your Jar file requirements.