| || |
= LocalIO =
= LocalIO =
This [[../API-Extensions|Extension]] provides access to local files.
This [[../API-Extensions|Extension]] provides access to local files .
| || |
Latest revision as of 12:23, 24 June 2011
This Extension provides access to local files using asynchronous IOJob objects.
- IOJob getUrl(Url url): attempts to fetch the file using an IOJob
- IOJob getUrl(String url): attempts to fetch the file using an IOJob
- String userDataPath([String type, String path]): (scripting version >= 4) returns the default path for user data. Called with no parameters, it returns the user's home directory. If only one string is passed in, the standard directory for that type of data in the user's home directory will be located; the following values are recognized:
- desktop (should be considered deprecated for Plasma workspaces)
If a second string is passed in, it is considered a request for a specific path and the following types are recognized:
- apps - Applications menu (.desktop files).
- autostart - Autostart directories (both XDG and kde-specific)
- cache - Cached information (e.g. favicons, web-pages)
- cgi - CGIs to run from kdehelp.
- config - Configuration files.
- data - Where applications store data.
- emoticons - Emoticons themes
- exe - Executables in $prefix/bin. findExe() for a function that takes $PATH into account.
- html - HTML documentation.
- icon - Icons, see KIconLoader.
- kcfg - KConfigXT config files.
- lib - Libraries.
- locale - Translation files for KLocale.
- mime - Mime types defined by KDE-specific .desktop files.
- module - Module (dynamically loaded library).
- qtplugins - Qt plugins (dynamically loaded objects for Qt)
- services - Services.
- servicetypes - Service types.
- sound - Application sounds.
- templates - Templates for the "Create new file" functionality.
- wallpaper - Wallpapers.
- tmp - Temporary files (specific for both current host and current user)
- socket - UNIX Sockets (specific for both current host and current user)
- xdgconf-menu - Freedesktop.org standard location for menu layout (.menu) files.
- xdgdata-apps - Freedesktop.org standard location for application desktop files.
- xdgdata-dirs - Freedesktop.org standard location for menu descriptions (.directory files).
- xdgdata-mime - Freedesktop.org standard location for MIME type definitions.
- xdgdata-icon - Freedesktop.org standard location for icons.
- xdgdata-pixmap - Gnome-compatibility location for pixmaps.
The second parameter should be a specific resource to find the path to. An example might be userDataPath("data", "plasma-desktop").
This page was last modified on 24 June 2011, at 12:23. This page has been accessed 1,802 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.