KDE 4.9 PyKDE API Reference

- KDE's Python API

# KFileItemListProperties Class Reference

`from PyKDE4.kio import *`

## Detailed Description

Provides information about the common properties of a group of KFileItem objects.

Given a list of KFileItems, this class can determine (and cache) the common mimetype for all items, whether all items are directories, whether all items are readable, writable, etc. As soon as one file item does not support a specific capability (read, write etc.), it is marked as unsupported for all items.

This class is implicitly shared, which means it can be used as a value and copied around at almost no cost.

Since:
  4.3

## Methods
| __init__ (self)
| __init__ (self, KFileItemList items)
| __init__ (self, KFileItemListProperties a0)
bool | isDirectory (self)
bool | isLocal (self)
KFileItemList | items (self)
QString | mimeGroup (self)
QString | mimeType (self)
| setItems (self, KFileItemList items)
bool | supportsDeleting (self)
bool | supportsMoving (self)
bool | supportsReading (self)
bool | supportsWriting (self)
KUrl.List | urlList (self)

## Method Documentation

__init__ | ( |  | self ) |

Copy constructor

__init__ | ( | self, |
|  | KFileItemList | items
| ) |  |  |

Constructor that takes a KFileItemList and sets the capabilities supported by all the FileItems as true.

Parameters:

  | items | The list of items that are to have their supported capabilities checked.

__init__ | ( | self, |
|  | KFileItemListProperties | a0
| ) |  |  |

Copy constructor

bool isDirectory | ( |  | self ) |

Returns:
  true if all items are directories

bool isLocal | ( |  | self ) |

Check if files are local

Returns:
  true if all the FileItems are local, otherwise there is one or more remote file, so false.

KFileItemList items | ( |  | self ) |

List of fileitems passed to the constructor or to setItems().

QString mimeGroup | ( |  | self ) |

Returns:
  the mimetype group (e.g. "text") of all items, if they all have the same, otherwise empty

QString mimeType | ( |  | self ) |

Returns:
  the mimetype of all items, if they all have the same, otherwise empty

setItems | ( | self, |
|  | KFileItemList | items
| ) |  |  |

Sets the items that are to have their supported capabilities checked.

bool supportsDeleting | ( |  | self ) |

Check if deleting capability is supported

Returns:
  true if all the FileItems can be deleted, otherwise false.

bool supportsMoving | ( |  | self ) |

Check if moving capability is supported

Returns:
  true if all the FileItems can be moved, otherwise false.

bool supportsReading | ( |  | self ) |

Check if reading capability is supported

Returns:
  true if all the FileItems can be read, otherwise false.

bool supportsWriting | ( |  | self ) |

Check if writing capability is supported (file managers use this mostly for directories)

Returns:
  true if all the FileItems can be written to, otherwise false.

KUrl.List urlList | ( |  | self ) |

List of urls, gathered from the fileitems