Results 1 to 6 of 6

Thread: How to use QNetworkAccessManager

  1. #1
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to use QNetworkAccessManager

    Hello,

    I am using QNetworkAccessManager to ftp files. How do I skip the symbolic files? I just want to ftp the actual physical files, not the symbolic link files.

    Thanks!

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: How to use QNetworkAccessManager

    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  3. #3
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to use QNetworkAccessManager

    Quote Originally Posted by jefftee View Post
    There is no method to get QFileInfo or QUrlInfo from the QNetwork module...

  4. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: How to use QNetworkAccessManager

    Quote Originally Posted by lni View Post
    There is no method to get QFileInfo or QUrlInfo from the QNetwork module...
    Nor did I say there was. I had assumed you are sending files via FTP, so if that's the case, you have a file path which you could use QFileInfo to determine if the file/directory is a symbolic link.

    If you're receiving files via FTP, then that would be up to the sending client/server to skip files that may be symbolic links. i.e. How would you know on the receiving end if the file was a symbolic link on the sending system?
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  5. #5
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to use QNetworkAccessManager

    I am at the receiving side. Some of files in sending side are symbolic link which I don't want to ftp. So I am trying to figure out how to know if a file at remote sending site is a symbolic link so I can skip it. The sending site allows the symbolic link files to be sent...
    Last edited by lni; 15th June 2016 at 19:52.

  6. #6
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: How to use QNetworkAccessManager

    As you have found, QNetwork* doesn't care or even know if the remote file is a symbolic link or not, so you'll have to determine that on your own and request only the files that are not symbolic links to be transferred. Once the file has been transferred to your local system, it will be a regular file, even if the source was a symbolic link.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. QNetworkAccessManager & QML Progress
    By scgrant327 in forum Qt Quick
    Replies: 1
    Last Post: 25th March 2016, 14:16
  2. Example for QNetworkAccessManager with SSL
    By KeineAhnung in forum Newbie
    Replies: 1
    Last Post: 12th February 2016, 13:52
  3. How to use QNetworkAccessManager?
    By radmir in forum Newbie
    Replies: 1
    Last Post: 25th February 2013, 14:43
  4. QNetworkAccessManager
    By cuteatul in forum Qt Programming
    Replies: 1
    Last Post: 8th July 2011, 05:34
  5. POST and QNetworkAccessManager
    By hakermania in forum Newbie
    Replies: 1
    Last Post: 13th February 2011, 00:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.