How to check if file exist at FTP server in Objective-C - objective-c

In this app, I am using FTP server to download and upload images to the server. Now, I want to check if file exist at server. I would have the file name to check on the server. Currently, I am using FTPManager class to do all uploading and downloading. Its working fine. But I couldn't find any solution to check if file exist at server
Please help me in this.

Assuming you're talking about this FTPManager class, it seems to me like you should be able to create a new FMServer instance with the path to the folder you want, then call the manager's -contentsOfServer: method to get an array of dictionaries containing file information at that path.

Related

Is it possible to rename a file on FTP server programmatically using cocoa?

My basic requirement is to add a ".temp" suffix to a file while it is getting uploaded on to the FTP server (suffix should be only for time until the file is fully uploaded).
As per my understanding, i thought this could be achieved by: Add a suffix to file on the local machine, then upload it and after the upload is complete, rename the file to remove suffix on server.
But now the another problem is that i could not found a way to rename a file on FTP server using cocoa. I know renaming a file is feasible using Java or other languages but i want to achieve the same in objectiveC.
Please tell be if the above task is feasible and if it is what is the approach i should follow?
FYI: I know how to upload and download a file on FTP server using NSInputStream and NSOutputStream.
Thanks. I'd appreciate any help.
Take a look at CFNetwork FTP docs. They do not mention exactly your case, but there may be a way to sent RNFR and RNTO commands over the stream.
https://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/CFFTPTasks/CFFTPTasks.html#//apple_ref/doc/uid/TP30001132-CH9-SW1
There is also a sample project you can look into:
https://developer.apple.com/library/ios/samplecode/SimpleFTPSample/Listings/Read_Me_About_SimpleFTPSample_txt.html
This library claims to do what you want (rename remote files)
http://www.chilkatsoft.com/ftp-objc.asp

Upload entire directory via FTP in VB.NET

I have successfully been able to upload single files to an FTP with this:
My.Computer.Network.UploadFile
Is there a way to upload an entire directory, such as this:
My.Computer.Network.UploadFolder
Never worked with FTP in VB.NET, but it seems there is no direct way to do it.
Here is what people say about how it can be done:
Traversal the local directory
Create the same directory structure in the FTP server.
Upload the file in each local directory.
Also see here for same question answered (C#). It confirms there is no built-in way. You would have to write some code or use 3rd party libraries.

Display list files and folder using Mediafire API

I tryed to use Mediafire API, but when I use Folder, get_info, it doesn't return file & folder array like the example.
Full url I used: http://www.mediafire.com/api/folder/get_info.php?folder_key=l461cm2d8hfxd
What's wrong with my attempt? Thank you.
You can try the MediaFire API PHP Library. This class currently implements all the functions in the Mediafire API.
Ok I just took a look at their API documentation. They've updated the get_info function for the folders. They've taken out the file tree....
So if you are uploading via the dropbox (which doesn't return the quickkey associated with the file), you CAN NEVER dropbox upload and then use the api to find the file and download it. This renders their API as useless as tits on a boar hog.
The point of a dropbox is to allow remote uploads to a folder, you then know the folder key so you can query the API and return the document quickkeys that are in the folder which then allows you to manage those files remotely, move, delete, download etc. Now you cannot do this FAIL FAIL FAIL.
Despite the Functionality of get_info not working, folder search can resolve at least some issues with retrieving quick keys. In my case i searched for ".mp3" and was handed all the mp3s in my folder

How to get a the remote file attributes through FTP using ConnectionKit

I need to get the file attributes of a remote file using the ConnectionKit framework.
What I am trying to do is compare the modification date of the file on the server and if it is newer than the local copy then download it. I've got the CKTransferRecord for the transfer but this only gives me the remote file path not that remote files attributes.
What is the best way to get the remote files attributes?
Thanks for your help!

Connecting to a File share with a flat file source in SSIS2005

I have created a SSIS package in BIDS005 that uses a flat file source as the input. The file I am wanting to use doesnt exist on my local machine, or on the server where the package will be executed. The file exists on a file share on another server, however when I try to use the server path for example:
\\servername\fileshare$\filename.csv
I get an error message saying:
A valid filename must be selected
Any ideas why this is happening?
It could be a permissions problem. Do you have a valid connection to the file containing the userID & pwd to connect to the share drive?
Is it a problem in the development environment, or only when deployed?