Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Where does SFML Android save FTP files?  (Read 2015 times)

0 Members and 1 Guest are viewing this topic.

kacperski1

  • Newbie
  • *
  • Posts: 1
    • View Profile
Where does SFML Android save FTP files?
« 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 :)

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Where does SFML Android save FTP files?
« Reply #1 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?