/usr/share/sip/PyKDE4/kio/kfileitem.sip is in python-kde4-dev 4:4.8.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | //
// Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
// Earlier copyrights 1998 - 2007 Jim Bublitz also apply
// Generated by twine
// This file is part of PyKDE4.
// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.
// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
class KFileItem
{
%TypeHeaderCode
#include <kfileitem.h>
%End
public:
enum
{
Unknown
};
enum FileTimes
{
ModificationTime,
AccessTime,
CreationTime
};
KFileItem ();
KFileItem (const KIO::UDSEntry& entry, const KUrl& itemOrDirUrl, bool delayedMimeTypes = 0, bool urlIsDirectory = 0);
KFileItem (mode_t mode, mode_t permissions, const KUrl& url, bool delayedMimeTypes = 0);
KFileItem (const KUrl& url, const QString& mimeType, mode_t mode);
KFileItem (const KFileItem& other);
void refresh ();
void refreshMimeType ();
KUrl url () const;
void setUrl (const KUrl& url);
void setName (const QString& name);
mode_t permissions () const;
QString permissionsString () const;
bool hasExtendedACL () const;
KACL ACL () const;
KACL defaultACL () const;
mode_t mode () const;
QString user () const;
QString group () const;
bool isLink () const;
bool isDir () const;
bool isFile () const;
bool isReadable () const;
bool isWritable () const;
bool isHidden () const;
bool isDesktopFile () const;
QString linkDest () const;
KUrl targetUrl () const;
QString localPath () const;
KIO::filesize_t size () const;
KDateTime time (KFileItem::FileTimes which /Constrained/) const;
time_t time (unsigned int which /Constrained/) const;
QString timeString (KFileItem::FileTimes which = KFileItem::ModificationTime) const;
QString timeString (unsigned int which) const;
bool isLocalFile () const;
QString text () const;
QString name (bool lowerCase = 0) const;
QString mimetype () const;
KMimeType::Ptr determineMimeType () const;
KMimeType::Ptr mimeTypePtr () const;
bool isMimeTypeKnown () const;
QString mimeComment () const;
QString iconName () const;
QPixmap pixmap (int _size, int _state = 0) const;
QStringList overlays () const;
QString getStatusBarInfo () const;
QString getToolTipText (int maxcount = 6) const;
bool acceptsDrops () const;
void run (QWidget* parentWidget = 0) const;
KIO::UDSEntry entry () const;
bool isMarked () const;
void mark ();
void unmark ();
bool isRegularFile () const;
bool cmp (const KFileItem& item) const;
bool operator == (const KFileItem& other) const;
bool operator != (const KFileItem& other) const;
//ig void setExtraData (const void* key, void* value);
//ig const void* extraData (const void* key) const;
//ig void removeExtraData (const void* key);
void setMetaInfo (const KFileMetaInfo& info) const;
KFileMetaInfo metaInfo (bool autoget = 1, int what = KFileMetaInfo::Fastest) const;
void assign (const KFileItem& item);
void setUDSEntry (const KIO::UDSEntry& entry, const KUrl& url, bool delayedMimeTypes = 0, bool urlIsDirectory = 0);
KUrl mostLocalUrl (bool& local /Out/) const;
bool isNull () const;
~KFileItem ();
//ig QVariant operator QVariant () const;
KUrl nepomukUri () const;
QString comment () const;
//ig KUrl mostLocalUrl () const;
};
// KFileItem
uint qHash (const QString& key);
uint qHash (const KFileItem& item);
%ModuleHeaderCode
#include <kfileitem.h>
%End
%ModuleHeaderCode
#include <kfileitem.h>
%End
class KFileItemList
{
%TypeHeaderCode
#include <kfileitem.h>
%End
public:
KFileItemList ();
KFileItemList (const QList<KFileItem>& items);
KFileItem findByName (const QString& fileName) const;
KFileItem findByUrl (const KUrl& url) const;
KUrl::List urlList () const;
KUrl::List targetUrlList () const;
//force
int __len__ ();
%MethodCode
Py_BEGIN_ALLOW_THREADS
sipRes = sipCpp -> count();
Py_END_ALLOW_THREADS
%End
void __setitem__ (int, const KFileItem&);
%MethodCode
int len;
len = sipCpp -> count();
if ((a0 = sipConvertFromSequenceIndex(a0,len)) < 0)
sipIsErr = 1;
else
(*sipCpp)[a0] = *(KFileItem *)a1;
%End
void __setitem__ (SIP_PYSLICE, const KFileItemList&);
%MethodCode
SIP_SSIZE_T len, start, stop, step, slicelength, i;
len = sipCpp -> count();
if (sipConvertFromSliceObject(a0,len,&start,&stop,&step,&slicelength) < 0)
sipIsErr = 1;
else
{
int vlen = a1 -> count();
if (vlen != slicelength)
{
sipBadLengthForSlice(vlen,slicelength);
sipIsErr = 1;
}
else
{
KFileItemList::ConstIterator it = a1 -> begin();
for (i = 0; i < slicelength; ++i)
{
(*sipCpp)[start] = *it;
start += step;
++it;
}
}
}
%End
void __delitem__ (int);
%MethodCode
int len;
len = sipCpp -> count();
if ((a0 = sipConvertFromSequenceIndex(a0,len)) < 0)
sipIsErr = 1;
else
sipCpp -> removeAt ( a0);
%End
void __delitem__ (SIP_PYSLICE);
%MethodCode
SIP_SSIZE_T len, start, stop, step, slicelength, i;
len = sipCpp -> count();
if (sipConvertFromSliceObject(a0,len,&start,&stop,&step,&slicelength) < 0)
sipIsErr = 1;
else
for (i = 0; i < slicelength; ++i)
{
sipCpp -> removeAt (start);
start += step - 1;
}
%End
KFileItem operator [] (int);
%MethodCode
int len;
len = sipCpp->count();
if ((a0 = (int)sipConvertFromSequenceIndex(a0, len)) < 0)
sipIsErr = 1;
else
sipRes = new KFileItem((*sipCpp)[a0]);
%End
KFileItemList operator [] (SIP_PYSLICE);
%MethodCode
SIP_SSIZE_T len, start, stop, step, slicelength, i;
len = sipCpp->count();
#if PY_VERSION_HEX >= 0x03020000
if (PySlice_GetIndicesEx(a0, len, &start, &stop, &step, &slicelength) < 0)
#else
if (PySlice_GetIndicesEx((PySliceObject *)a0, len, &start, &stop, &step, &slicelength) < 0)
#endif
sipIsErr = 1;
else
{
sipRes = new KFileItemList();
for (i = 0; i < slicelength; ++i)
{
(*sipRes) += (*sipCpp)[start];
start += step;
}
}
%End
//end
};
// KFileItemList
QDataStream& operator << (QDataStream& s, const KFileItem& a);
QDataStream& operator >> (QDataStream& s, KFileItem& a);
//ig QDebug operator << (QDebug stream, const KFileItem& item);
|