From: Adam R. <ad...@ex...> - 2011-07-18 21:44:48
|
Okay, so as I have been promising - As of revision 14905 of trunk, I have re-factored the ftpclient module - 1) The functions are now much simplifier and cleaner. I also updated the ftp_example.xq to show this - e.g. - xquery version "1.0"; import module namespace ftpclient="http://exist-db.org/xquery/ftpclient"; let $connection := ftpclient:get-connection("ftp.host.com", "username", "password") return let $file-to-send := util:binary-doc("/db/ftp_test/image.jpg") return ftpclient:send-binary-file($connection, "remote/dir", "image.jpg") (: ftpclient:list($connection, "remote/dir") :) (: let $file := ftpclient:get-binary-file($connection, "remote/dir", "file.name") :) 2) You now have persistent handles, this is much more efficient, so you can open a connection (or several) and re-use these connections for subsequent ftp operations within the same query. When the query completes execution, these connections are auto-magically shutdown for you. Cheers Adam. On 15 July 2011 22:39, Paul Kelly <pa...@xm...> wrote: > Heh, I guess the ftp//: looked like an ipv6 namespace or something. Removing that got me a dir listing as promised by getDirectoryList. > > Thanks! > > > > > On 2011-07-15, at 4:32 PM, Dannes Wessels wrote: > >> What about >> >> http://stackoverflow.com/questions/4371205/apache-commons-ftp >> >> does this provide a clue? >> >> >> On 15 Jul 2011, at 20:34 , Paul Kelly wrote: >> >>> Can't find it. But I'm getting the same error with other addresses that can be found: >>> >>> [paul-2:exist/svn/trunk] paul% host ftp.bic.mni.mcgill.ca >>> ftp.bic.mni.mcgill.ca is an alias for noodles.bic.mni.mcgill.ca. >>> noodles.bic.mni.mcgill.ca has address 132.206.178.83 >> >> Kind regards >> >> Dannes >> >> -- >> eXist-db Native XML Database - http://exist-db.org >> Join us on linked-in: http://www.linkedin.com/groups?gid=35624 >> >> >> >> >> >> >> >> > > ------------------------------------------- > Paul Kelly > Director, Software Development > XML Team Solutions Corp. > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |