Replace file on ftp server - ios

I'm searching a lot, but don't find any documentations or examples.
How to replace file from one directory to another on ftp server?
Any examples?

There is no "move" command in the ftp protocol.
Check this one:
http://www.scriptftp.com/reference.php?go=topic133

I'd recommend to use this library https://github.com/karelia/ConnectionKit to work with FTP on iOS. There are lot of examples in README file.

Related

Grails 3 web interface with zip upload via form to a folder on the server

I'm trying to create a Grails 3 web interface with an upload form that writes zip files to a folder on the server.
I have already tried a lot of plugins or solutions that can be found here but nothing seems to work.
My code can be found on github (https://github.com/rm93/BIGC).
Would anyone know a solution that I could apply?
I have found a solution to my problem. Instead to give a path to the transferTo method i now I give it a new file.
fileUpload.transferTo(new File("/path/to/folder/data.zip"))

iOS:How to check if an directory already exists on the FTP server while uploading?

I am working on an App, in which I want to upload images and pdf to the FTP server. I am using this reference ref.All is working good. The images and pdf are getting uploaded on the server with proper names and sizes.
But, now I want to check if the directory is already exists on the server or not. I am not able to get it to work with this library.
So my question is that how to check directory on ftp,if directory is there then upload the files if not then first create directory on ftp and then upload files onto that directory?
Any Ideas.. ? Any help will be appreciated.
Different FTP servers will answer the LIST request in differing ways, so there is no single answer to this question. RFC959 says on the matter:
Since the information on a file may vary widely from system
to system, this information may be hard to use automatically
in a program, but may be quite useful to a human user.
Using the CWD request to change into the directory in question, and detecting a successful response will detect the directory, however that leaves you in that directory as a potentially unrequired side effect.
For these reasons, as well as others, you may find more modern protocols such as SSH (which includes a file transfer feature) to be more useful. You may find the DLSFTPClient CocoaPod useful.
M.

Content stream to CMIS's file without API

I have a fileshare server (from apache opencmis project) that I want to access directly by a web page. So by using javascript probably. My question is :
-Is it possible to work on a cmis repository using http request (like here for alfresco server)?
I find that there is very few information on the subject.
Thanks
edit : Maybe my need isn't clear after reading me again. So to simplify I'm looking for a litle static html/javascript code. My purpose is to upload a new file to folder (I know his ObjectId) or modify content of a file.
Ps : Only LGPL, Apache or similar licence.
Thanks again!
There is a rudimentary example here:
https://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/web/index.html?view=markup

delete files from ftp with powershell

I need a script that will delete all files from a ftp directory, and then upload a folder on my local machine to that same ftp location. Any ideas?? Thanks in advance
$ftprequest = [System.Net.FtpWebRequest]::Create($Sourceuri)
$ftprequest.Credentials = New-Object System.Net.NetworkCredential($user,$pass)
$ftprequest.Method = [System.Net.WebRequestMethods+Ftp]::DeleteFile
$ftprequest.GetResponse()
Powershell doesn't have anything built-in for this, but you could use FtpWebRequest and other related .NET classes to access FTP sites.
If you want a cmdlet, then you could check out NetCmdlets. It appears to be free for personal use.
This might be a helpful place to start. You are going to need to implement each FTP function you want to use (GetDirectoryList, Upload, Delete) either using native .NET code or using your .NET DLL or client.

File System access from Firefox Extension

Is it possbile to create a firefox extendsion to write to files in a windows file system ?
Yes, see this page for examples.
Edit
XPCOM and so nsIFile are now legacy technologies :
Use of OS.File is preferred over the examples in this article. Only use these legacy interfaces if OS.File is not available to you.
You can find the new way to go here

Resources