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!
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!
Look at QFileInfo::isSymLink()
I write the best type of code possible, code that I want to write, not code that someone tells me to write!
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!
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.
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!
Bookmarks