mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-18 03:30:48 +00:00
27 lines
764 B
C++
27 lines
764 B
C++
#include "quazipfileinfo.h"
|
|
|
|
QFile::Permissions QuaZipFileInfo::getPermissions() const
|
|
{
|
|
quint32 uPerm = (externalAttr & 0xFFFF0000u) >> 16;
|
|
QFile::Permissions perm = 0;
|
|
if ((uPerm & 0400) != 0)
|
|
perm |= QFile::ReadOwner;
|
|
if ((uPerm & 0200) != 0)
|
|
perm |= QFile::WriteOwner;
|
|
if ((uPerm & 0100) != 0)
|
|
perm |= QFile::ExeOwner;
|
|
if ((uPerm & 0040) != 0)
|
|
perm |= QFile::ReadGroup;
|
|
if ((uPerm & 0020) != 0)
|
|
perm |= QFile::WriteGroup;
|
|
if ((uPerm & 0010) != 0)
|
|
perm |= QFile::ExeGroup;
|
|
if ((uPerm & 0004) != 0)
|
|
perm |= QFile::ReadOther;
|
|
if ((uPerm & 0002) != 0)
|
|
perm |= QFile::WriteOther;
|
|
if ((uPerm & 0001) != 0)
|
|
perm |= QFile::ExeOther;
|
|
return perm;
|
|
}
|