cfsftp - dir as query - minor release

ColdFusion Add comments
As promised in my last entry, a new minor release of cfsftp (1.3.2) is now available to download that returns a query instead of an array when you call the dir method.

Please let me know if there are any issues with other server configurations. My test environment is connecting from windows to a Red Hat Linux server and it seems to work OK, but some users have had issues with other configurations.

Enjoy.

22 responses to “cfsftp - dir as query - minor release”

  1. Markus Says:
    I wonder why you do an expandPath() on the workingdir-Parameter? It's quite difficult to access some local directory outside of the webroot. I'd find it rather less confusing if workingdir was really an absolute path in relation to the local filesystem - one could always use getCurrentTemplatePath() or similar functions to pass the correct value to this parameter if one would actually wish to use some form of relative addressing.

    Apart from this minor annoyance - cfsftp is really some extremely useful piece of code :)
  2. Markus Says:
    Regarding my above post, I'd really be very happy if I had some option to influence the CFC's behaviour about the expandPath of the working_dir parameter, maybe like so:

    diff sftp.cfc.original sftp.cfc.patched
    4a5
    > <cfargument name="abspath" required="false" default=FALSE>
    8d8
    < variables.working_dir = expandPath(arguments.workingdir);
    16a17,20
    > if (arguments.abspath)
    > { variables.working_dir = arguments.workingdir; }
    > else
    > { variables.working_dir = expandPath(arguments.workingdir); }

    I have introduced a new optional parameter abspath, which defaults to TRUE, but when set to TRUE, would use the working_dir parameter without further processing, thus allowing for absolute path declarations relative to the local filesystem root:

    <cfset mysftp = createobject("component","CFLib.sftp").init(workingdir="/var/www/myapp/mysubfolder/", abspath=TRUE)>

    Kind regards

    Markus
  3. David Kuenzler Says:
    I get a "CFSFTP.dir;Failure" exception in dir() when the remote directory has more than 184 entries.
    After uncommenting the try...catch in SFTP.cfc dir() I get this:

    java.io.IOException: inputstream is closed
    at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2125)
    at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2149)
    at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1194) ...

    It's probably a Proxy/Firewall/SFTP Server issue because with a local SFTP Test Server it works fine.
    But the server that does not work with CFSFTP works with other SFTP clients like Filezilla,...

    Has anyone else run into this problem?

    Thanks, David
  4. Matthew Abbott Says:
    Has anyone tried to do FTPS over SSL using the new CF8 and .NET? The cfftp only does SFTP on cf8 and i need a "free" solution to do FTPS over SSL with cf. Im looking at the .NET classes and I can convert mostly everything to cf8 except a few lines...

    Some of the .NET info shows how I can trust any certificate with the ServicePointManager. and it uses a delegate() method. I cannot for the life of me figure out how to convert this into CF code.

    http://blogs.msdn.com/adarshk/archive/2005/04/22/410925.aspx

    Im hesitant to list another blog's url, but That shows how to do it in .NET. I just need to convert it over to CF8.

    Thanks all.

    Matthew
  5. Rick Says:
    We've been using cfsftp in an application for about 8 months now, and it's been a lifesaver. A head's up: We just upgraded to CF8 (from MX6.1) and it appears to break cfsftp. Here's the error that was generated:

    Object Instantiation Exception.
    Class not found: MyProgressMonitor
    The error occurred in ....... \sftp.cfc: line 7
    5 : <cfscript>
    6 :     variables.jsch = createobject('java',"com.jcraft.jsch.JSch");
    7 :     variables.mymonitor = createobject('java',"MyProgressMonitor");
    8 :     variables.working_dir = expandPath(arguments.workingdir);
    9 :     variables.errormess = arrayNew(1);

    Fortunately, CF8 has sftp functionality built-in. But thanks for making cfsftp available -- like I said, it's really been a lifesaver for us.
  6. Oyun Says:
    harika bir olay stne diyecek bir_ey bulam1yorum umar1m daha ba_ar1l1 i_lere imza atars1n1z sizleri tebrik ediyor ba_ar1lar1n1z devam1 diliyorum. Kolay gelsin.


    visit : http://www.Aylak.com
  7. tavla indir Says:
    tavla oyunu
  8. siirt Says:
    siirtliler
  9. tom w Says:
    It seems I can use the cfc once. Then it will just hang on any further attempts to use it. If I restart the CF Service it will work again, once. I'm using Windows 2003 Server. Any ideas would be appreciated.
  10. plastik cerrahi Says:
    Leah is definitely the one who should win. Science Fiction Conventions? What?! She deserves a win, indeed!
  11. Estetik Says:
    I'm guessing the only way to do this in Javascript would be to use the onresize event, and then using the resizeTo method to attempt to keep the window at the size you want?
  12. Estetik Says:
    Very interesting way to turn Wordpress into a forum! Thanks for sharing the info, Ive been looking for a painless way to do this and think Ive found what Ive been looking for
  13. Meme Estetigi Says:
    Duplicate Content Cure Una muy simple, pero eficaz plugin SEO que impide que los motores de bsqueda indexen p£ginas que
  14. popmYT Says:
    I still think PHP has a major role to play in the future, with PHP5 object oriented and great features like SimpleXML - http://file.sh/XML+torrent.html. IMHO I see PHP scripts for frontend apps and RoR apps for all the backend stuff, and thats what Iam actually trying to do at work.
  15. Bane Says:
    Badly need your help. Good taste is the enemy of comedy. Help me! I find sites on the topic: Online gantt chart. I found only this - <a href="http://knowledge.uneca.org/Members/Gantchart">engineering gant chart</a>. Daniels is listed by lance reddickvalchek is the deputy commissioner of administration. Later she is only typical of her title when he is led for investigation calendar, making that avon was purpose-built for recording him to play up musicians. Thanks for the help :eek:, Bane from Belize.
  16. nintendo wii repairs Says:
    this is nice information need to know more
  17. Mercedes Repair Raleigh Says:
    Wonder full writing skills you got mate.


    Regards

    Angela
  18. Dating online Says:
    Nice articles ,see my best dating sites http://www.dating-free.w-rus.com
  19. NC Furniture Says:
    I digged this for more news from you.



    Regards and respect


    Jamie
  20. WbLily Says:
    Did you take support of a <a href="http://quality-papers.com/topics/comparison_essay">comparison essay writing</a> service for your famous release? I opine that you have good argumentative essay composing technique. Thanks a lot for sharing this!
  21. okey oyna Says:
    okey oyunu
  22. diyet,diyetlistesi Says:
    Very interesting way to turn Wordpress into a forum! Thanks for sharing the info, Ive been looking for a painless way to do this and think Ive found what Ive been looking for

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio