25#include <kio/global.h>
31 if( info.type() == UrlInfo::message ) {
33 }
else if( info.type() == UrlInfo::directory ) {
36 return KIO::UDSEntry();
42 kDebug() <<
"Stat::stat()";
46 if( info.type() == UrlInfo::invalid ) {
48 }
else if( info.type() == UrlInfo::message ) {
52 entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG );
53 entry.insert( KIO::UDSEntry::UDS_MIME_TYPE, QString(
"message/rfc822" ) );
55 url = QString(
"mbox:%1/%2" ).arg( info.filename(), mbox.
currentID() );
56 entry.insert( KIO::UDSEntry::UDS_URL, url );
58 entry.insert( KIO::UDSEntry::UDS_NAME, QString(
"" ) );
60 entry.insert( KIO::UDSEntry::UDS_NAME, mbox.
currentID() );
63 entry.insert( KIO::UDSEntry::UDS_SIZE, mbox.
skipMessage() );
70 kDebug() <<
"statDirectory()";
74 entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR );
75 entry.insert( KIO::UDSEntry::UDS_NAME, info.filename() );
82 kDebug() <<
"statMessage(" << info.url() <<
" )";
84 QString url = QString(
"mbox:%1" ).arg( info.url() );
87 entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG );
88 entry.insert( KIO::UDSEntry::UDS_MIME_TYPE, QString(
"message/rfc822" ) );
90 entry.insert( KIO::UDSEntry::UDS_URL, url );
91 url = url.right( url.length() - url.lastIndexOf(
"/" ) - 1 );
92 entry.insert( KIO::UDSEntry::UDS_NAME, url );
This class handels reading from a mbox-file.
bool searchMessage(const QString &id)
This function search the file for a certain id.
unsigned int skipMessage()
Skips all lines which belongs to the current message.
QString currentID() const
This function returns the current id.
static KIO::UDSEntry statMessage(const UrlInfo &info)
This function gets the stats of a geven mbox-message in a UDSEntry.
static KIO::UDSEntry statDirectory(const UrlInfo &info)
This function gets the stats of a given mbox-file in an UDSEntry.
static KIO::UDSEntry stat(const UrlInfo &info)
This functions gives information with a given UrlInfo.
This file is part of the KDE documentation.
Documentation copyright © 1996-2026 The KDE developers.
Generated on
by
doxygen 1.15.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.