UDSEntry Class Reference
from PyKDE4.kio import *
Namespace: KIO.UDSEntry
Detailed Description
Universal Directory Service
UDS entry is the data structure representing all the fields about a given URL (file or directory).
The KIO.listDir() and KIO:stat() operations use this data structure.
KIO defines a number of standard fields, see the UDS_XXX enums (see StandardFieldTypes). at the moment UDSEntry only provides fields with numeric indexes, but there might be named fields with string indexes in the future.
For instance, to retrieve the name of the entry, use:
QString displayName = entry.stringValue( KIO.UDSEntry.UDS_NAME );
To know the modification time of the file/url:
time_t mtime = entry.numberValue( KIO.UDSEntry.UDS_MODIFICATION_TIME, -1 ); if ( mtime != -1 ) ...
Enumerations | |
StandardFieldTypes | { UDS_STRING, UDS_NUMBER, UDS_TIME, UDS_SIZE, UDS_SIZE_LARGE, UDS_USER, UDS_ICON_NAME, UDS_GROUP, UDS_NAME, UDS_LOCAL_PATH, UDS_HIDDEN, UDS_ACCESS, UDS_MODIFICATION_TIME, UDS_ACCESS_TIME, UDS_CREATION_TIME, UDS_FILE_TYPE, UDS_LINK_DEST, UDS_URL, UDS_MIME_TYPE, UDS_GUESSED_MIME_TYPE, UDS_XML_PROPERTIES, UDS_EXTENDED_ACL, UDS_ACL_STRING, UDS_DEFAULT_ACL_STRING, UDS_DISPLAY_NAME, UDS_TARGET_URL, UDS_DISPLAY_TYPE, UDS_NEPOMUK_URI, UDS_EXTRA, UDS_EXTRA_END } |
Methods | |
__init__ (self) | |
__init__ (self, KIO.UDSEntry other) | |
clear (self) | |
bool | contains (self, long field) |
int | count (self) |
insert (self, long field, QString value) | |
insert (self, long field, long long l) | |
bool | isDir (self) |
bool | isLink (self) |
[long] | listFields (self) |
long long | numberValue (self, long field, long long defaultValue=0) |
bool | remove (self, long field) |
QString | stringValue (self, long field) |
Method Documentation
__init__ | ( | self ) |
__init__ | ( | self, | ||
KIO.UDSEntry | other | |||
) |
clear | ( | self ) |
remove all fields
bool contains | ( | self, | ||
long | field | |||
) |
check existence of a field
- Parameters:
-
field
int count | ( | self ) |
count fields
- Returns:
- the number of fields
insert | ( | self, | ||
long | field, | |||
QString | value | |||
) |
insert field with string value
- Parameters:
-
field numeric tield id l value to set
insert | ( | self, | ||
long | field, | |||
long long | l | |||
) |
insert field with string value
- Parameters:
-
field numeric tield id l value to set
bool isDir | ( | self ) |
bool isLink | ( | self ) |
[long] listFields | ( | self ) |
lists all fields
long long numberValue | ( | self, | ||
long | field, | |||
long long | defaultValue=0 | |||
) |
- Returns:
- value of a numeric field
bool remove | ( | self, | ||
long | field | |||
) |
remove a field with a certain numeric id
- Parameters:
-
field numeric type id
QString stringValue | ( | self, | ||
long | field | |||
) |
- Returns:
- value of a textual field
Enumeration Documentation
StandardFieldTypes |
- Enumerator:
-