简体   繁体   中英

Is it possible to handle hardlink with Qt5?

I am currently modifying a Qt application which uses the bool QFile::link(const QString &linkName) function.

This function creates a link that points to the file linkName and the type of the link depends on the underlying systems.

The underlying system we use is Linux (Buildroot distribution) and by default the link created is a symlink.

I would like to know if someone did manage to force Qt to create hardlink rather than symbolic link ?

Qt has no API whatsoever (public or private) for creating hardlinks. You will need to use a native API instead. For Linux, that would be link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM