Qt5,指向文件夹的符号链接 [英] Qt5, symbolic link to a folder

查看:444
本文介绍了Qt5,指向文件夹的符号链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重复的问题此问题(可能)已得到过时的答案,因为我无法在Qt5中使用它.

A dupe-ish question of this question, which (possibly) has got an outdated answer, as I can't get it to work in Qt5.

我希望创建一个指向文件夹的符号链接,以得到类似于QFile::link()的结果.鉴于QDir没有等效功能,如果我要喘气,QProcess(或外部库)似乎是出路.在Qt5中如何管理?

I wish to create a symbolic link to a folder for a result similar to QFile::link(). Given that QDir doesn't have an equivalent function, QProcess (or an external library) seems like the way out if I'm up to snuff. How would this be managed in Qt5?

预先表示感谢.

推荐答案

我发现它无法在Qt中完成,因此我最终使用了Win32 API.具体来说,CreateSymbolicLink() 功能.

I found out that it cannot be done in Qt, so I ended up using the Win32 API instead. Specifically the CreateSymbolicLink() function.

这篇关于Qt5,指向文件夹的符号链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆