List FTP Directory

  1. 3 years ago

    Hi,
    I'm trying to write a small app that lists all files of a ftp directory. I don't find any source for that how to do it in swift. Do somebody have a small tutorial or some code I can base on?

    Thanks in advance

  2. last year

    niutech

    22 Jan 2016 Administrator

    Have a look at Rebekka .

    You can use it like this:

    var configuration = SessionConfiguration()
    configuration.host = "ftp://ftp.mozilla.org:21"
    configuration.username = "user"
    configuration.password = "pass"
    configuration.encoding = NSUTF8StringEncoding
    _session = Session(configuration: configuration)
    _session.list("/") {
        (resources, error) -> Void in
        println("List directory with result:\n\(resources), error: \(error)\n\n")
    }

  3. 8 months ago

    Sorry for the long waiting time. But it worked. I struggled a bit with getting rebekka to work (because i'm completely new to swift and ios programming) but in the end it worked!

    Thanks for this great tip!

  4. i think you can get your answer from here

    http://techknowledge9945.blogspot.com

or Sign Up to reply!