As you can see from the title, I'm suffering the problem. developer.apple.com didn't provide much information about this, I have to ask for solution somewhere else. I already know how to up/down-load files and create directories, but the official reference doesn't say how to undo it. I hope some one can tell me how to achieve this goal, or how to mount a ftp server as a local disk. Thanks.
Another option is to use a script to SSH to the remote machine then use your standard terminal commands "mount /dev/<whatever disk you want> /Volumes/<your newly created dir name for the remote disk>"to mount the volume to /Volumes/<your newly created dir name for the remote disk>
For the tunnel: SSH user@host -p<servers port default is 22 you might want to setup a port forward on your router>
for more information on SSH on OSX type man ssh in terminal.
Then as I stated your going to need to write that function / class yourself.
Your asking for solutions which I have given you several on how to mount the remote disk locally but you rejected the ideas because they are not an easy cookie cutter solution wrapped in an apple framework. What you are asking for is not something as simple as remove(char *).
I just want a solution in pure C/Obj-C solution, without shell scripts or any other language. I'd also like the solution to be platform-insenstive, without the conversion like AppKit to UIKit. And by undo I actually meant to really remove it even the file was already there without uploading.
Thank you anyway, though the example's in iOS, I was able to download its SDK.
I've done a research my self finding that there really isn't such API can do this. I think the MacOSX itself and many other BSDs' not designed for such a purpose which is: to operate a FTP server from remote. Rather, they're designed to be a server to delete them by itself. I think this could be the best answer to why there isn't how to delete ftp file/directory using MacOSX API.
This is no different then using a shell script to run SSH and SFTP. Using FTP is just a lot less secure. Do yourself a major favor and run it on a non-standard port number and or use port forwarding through your router. That will offer you some protection using standard FTP. But seriously consider switching to SSH now that you are essentially doing what I suggested in the first place.