List FTP Directory

  1. 5 years ago

    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. 3 years ago


    22 Jan 2016 Administrator

    Have a look at Rebekka .

    You can use it like this:

    var configuration = SessionConfiguration() = ""
    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. 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

or Sign Up to reply!