Maison des Arts et des Sciences Informatiques

chgrp avec Qt


Il s'agit ici de changer le groupe d'un fichier sous Linux avec Qt et C++

Fonctions Qt sur les fichiers

Elements of the file's name can be extracted with path() and fileName(). The fileName()'s parts can be extracted with baseName(), suffix() or completeSuffix(). QFileInfo objects to directories created by Qt classes will not have a trailing file separator. If you wish to use trailing separators in your own file info objects, just append one to the file name given to the constructors or setFile().

The file's dates are returned by birthTime(), lastModified(), lastRead() and fileTime(). Information about the file's access permissions is obtained with isReadable(), isWritable() and isExecutable()

The file's ownership is available from owner(), ownerId(), group() and groupId(). You can examine a file's permissions and ownership in a single statement using the permission() function.

Note: On NTFS file systems, ownership and permissions checking is disabled by default for performance reasons. To enable it, include the following line:

Permission checking is then turned on and off by incrementing and decrementing qt_ntfs_permission_lookup by 1.

A creuser

Comparer les fonctions suivantes avec les fonctions de la classe QfileInfo

En particulier étudier la fonction birthTime en passant à Qt 5.15

Cette fonction n'existe pas en Qt 5.7