delete file on ftp server from iphone app

2019-06-13 15:38发布

i can't figure out how to delete a ftp file from inside an iphone app i'm creating. i'm able to establish a connection, create directories, upload files, get a list of files - but i don't see any way to delete files (or empty directories) via ftp. Does anyone have a code snippet for me? i couldn't find anything about this in Apples SimpleSampleFTP example code.

so far i tried using

Boolean CFURLDestroyResource(CFURLRef url, SInt32 *errorCode);

but it always returns FALSE and gives me error-code -11 (kCFURLUnknownSchemeError). The FTP connection needs authorization (username and password), but i don't know how to provide that when using CFURLDestroyResource?

1条回答
ら.Afraid
2楼-- · 2019-06-13 16:01
url = (CFURLRef)[[NSURL alloc] initWithString:@"ftp://user:password@ftpServer.com/fileToRemove"];
查看更多
登录 后发表回答