SFML community forums

Help => Network => Topic started by: kacperski1 on March 28, 2015, 08:43:08 pm

Title: Where does SFML Android save FTP files?
Post by: kacperski1 on March 28, 2015, 08:43:08 pm
I've been experimenting with Android version of SFML and made it connect to an FTP server.
It works pretty well, but when I try to download or upload a file from/to the server, it doesn't happen to be there.

I'm almost sure that sf::Ftp doesn't use neither "/", "/sdcard" nor the assets directory for its operations on files, so I'd like to ask - what is the main directory of sf::Ftp on Android?

Here is the code I'm using, although I don't think it's important:
    Ftp test;
    Ftp::Response response = test.connect("blahblah.com", 21);
    response = test.login("username","andsomepassword");
    if(response.isOk())
    {
        test.upload("androidUploadTest.txt", "", sf::Ftp::Binary);
        test.download("test.txt", "", sf::Ftp::Ascii);
        test.download("test2.txt", "/sdcard/", sf::Ftp::Ascii);
        test.disconnect();
    }

Of course any of these upload/download commands don't seem to do anything.
Thanks for the help :)
Title: Re: Where does SFML Android save FTP files?
Post by: Mario on March 31, 2015, 11:08:10 pm
To be honest I haven't really tried to use the FTP component on Android so far. Writing to the sdcard (or anywhere else) isn't possible by default. Have you made sure your AndroidManifest.xml requests the proper permission to write to the SD card?