Is there readily available functionality for Java to create a folder hierarchy on a remote FTP server. Apache Commons does provide an FTP client, but I can't find a method for creating a directory hierarchy.
It does allow for creating a single directory (makeDirectory), but creating an entire path does not seem to be in there.
The reason I want this is because sometimes part of a directory hierarchy is not (yet) available and in such a case I want to create the missing part of the hierarchy and then change to that newly created directory.
解决方案
You have to use a combination of false.
You need to recursively walk the directory tree in the manner described above at each level create the directory as required.