ftp - I have some questions regarding external folder use within Java -
i have questions regarding external folder use within java,
i when load .jar file, creates external folders, names "resources", , wondering how go doing that?
another question know how download files ftp server (ftp.connorwright.uk) "resources" folder, lead me onto next question
my last question how can reference these external folders within code, without ioexception errors or anything
i have tried using commonsio library, didn't seem help.
thank you.
your first question easy
file folder = new file("path\to\your\folder\resources"); folder.mkdir();
you can replace "mkdir" "mkdirs" create entire path of folders in case doesn't exist
your second question bit complicated, website has great tutorial on it
http://www.codejava.net/java-se/networking/ftp/java-ftp-file-download-tutorial-and-example
and lastly, way can avoid ioexceptions if files looking exists, there's no universal trick.
hope helps
Comments
Post a Comment