I'm using libcurl to connect to my site via FTP. I want to know how to check if a file on my FTP exists or not. Or better yet, I want to know if a file I upload to my FTP overwrites an existing file or not.

Any help is greatly appreciated. I can post the code that I have so far if necessary. Thanks.