"test/" 1 0 0 0 "test/pict.jpg" 0 1 0 9229 "test/test.odt" 0 1 0 18527
C++ (Qt)permissions(QFile::ReadOwner | QFile::WriteOwner)
C++ (Qt)permissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner)
C++ (Qt) if (!name.endsWith(QDir::separator())) name.append(QDir::separator());
name = QDir::fromNativeSeparators(name);if (!name.endsWith(QLatin1Char('/')) name += QLatin1Char('/');
#ifndef FILE_ATTRIBUTE_READONLY# define FILE_ATTRIBUTE_READONLY 0x1#endif#ifndef FILE_ATTRIBUTE_DIRECTORY# define FILE_ATTRIBUTE_DIRECTORY 0x10#endifenum HostOS { HostFAT = 0, HostAMIGA = 1, HostVMS = 2, // VAX/VMS HostUnix = 3, HostVM_CMS = 4, HostAtari = 5, // what if it's a minix filesystem? [cjh] HostHPFS = 6, // filesystem used by OS/2 (and NT 3.x) HostMac = 7, HostZ_System = 8, HostCPM = 9, HostTOPS20 = 10, // pkzip 2.50 NTFS HostNTFS = 11, // filesystem used by Windows NT HostQDOS = 12, // SMS/QDOS HostAcorn = 13, // Archimedes Acorn RISC OS HostVFAT = 14, // filesystem used by Windows 95, NT HostMVS = 15, HostBeOS = 16, // hybrid POSIX/database filesystem HostTandem = 17, HostOS400 = 18, HostOSX = 19};void QZipPrivate::fillFileInfo(int index, QZipReader::FileInfo &fileInfo) const{ FileHeader header = fileHeaders.at(index); fileInfo.filePath = QString::fromLocal8Bit(header.file_name); quint32 mode = readUInt(header.h.external_file_attributes); const HostOS hostOS = HostOS(readUShort(header.h.version_made) >> 8); switch (hostOS) { case HostUnix: mode = (mode >> 16) & 0xffff; if (S_ISDIR(mode)) fileInfo.isDir = true; else if (S_ISREG(mode)) fileInfo.isFile = true; else if (S_ISLNK(mode)) fileInfo.isSymLink = true; fileInfo.permissions = modeToPermissions(mode); break; case HostFAT: case HostNTFS: case HostHPFS: case HostVFAT: fileInfo.permissions |= QFile::ReadOwner | QFile::ReadUser | QFile::ReadGroup | QFile::ReadOther; if ((mode & FILE_ATTRIBUTE_READONLY) == 0) fileInfo.permissions |= QFile::WriteOwner | QFile::WriteUser | QFile::WriteGroup | QFile::WriteOther; if ((mode & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY) { fileInfo.isDir = true; fileInfo.permissions |= QFile::ExeOwner | QFile::ExeUser | QFile::ExeGroup | QFile::ExeOther; } else { fileInfo.isFile = true; } break; default: return; // we don't support anything else } fileInfo.crc32 = readUInt(header.h.crc_32); fileInfo.size = readUInt(header.h.uncompressed_size); fileInfo.lastModified = readMSDosDate(header.h.last_mod_file);}
"tests/" 1 1 0 0 "tests/img/" 1 1 0 0 "tests/tests.xml" 0 1 0 7512
$ ls -R ~/Desktop/t//home/nortt/Desktop/t/:tests/home/nortt/Desktop/t/tests:img/home/nortt/Desktop/t/tests/img: