\section{KFile\-Item Class Reference}
\label{classKFileItem}\index{KFileItem@{KFileItem}}
A KFile\-Item is a generic class to handle a file, local or remote.  


{\tt \#include $<$kfileitem.h$>$}

Collaboration diagram for KFile\-Item:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=188pt]{classKFileItem__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum \{ {\bf Unknown} =  (mode\_\-t) - 1
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KFile\-Item} (const {\bf KIO::UDSEntry} \&\_\-entry, const {\bf KURL} \&\_\-url, bool \_\-determine\-Mime\-Type\-On\-Demand=false, bool \_\-url\-Is\-Directory=false)
\item 
{\bf KFile\-Item} (mode\_\-t \_\-mode, mode\_\-t \_\-permissions, const {\bf KURL} \&\_\-url, bool \_\-determine\-Mime\-Type\-On\-Demand=false)
\item 
{\bf KFile\-Item} (const {\bf KURL} \&url, const {\bf QString} \&mime\-Type, mode\_\-t mode)
\item 
{\bf KFile\-Item} (const {\bf KFile\-Item} \&item)
\item 
virtual {\bf $\sim$KFile\-Item} ()
\item 
void {\bf refresh} ()
\item 
void {\bf refresh\-Mime\-Type} ()
\item 
const {\bf KURL} \& {\bf url} () const 
\item 
void {\bf set\-URL} (const {\bf KURL} \&url)
\item 
void {\bf set\-Name} (const {\bf QString} \&name)
\item 
mode\_\-t {\bf permissions} () const 
\item 
{\bf QString} {\bf permissions\-String} () const 
\item 
mode\_\-t {\bf mode} () const 
\item 
{\bf QString} {\bf user} () const 
\item 
{\bf QString} {\bf group} () const 
\item 
bool {\bf is\-Link} () const 
\item 
bool {\bf is\-Dir} () const 
\item 
bool {\bf is\-File} () const 
\item 
bool {\bf is\-Readable} () const 
\item 
bool {\bf is\-Writable} () const 
\item 
bool {\bf is\-Hidden} () const 
\item 
{\bf QString} {\bf link\-Dest} () const 
\item 
{\bf QString} {\bf local\-Path} () const 
\item 
{\bf KIO::filesize\_\-t} {\bf size} () const 
\item 
time\_\-t {\bf time} (unsigned int which) const 
\item 
{\bf QString} {\bf time\-String} (unsigned int which=KIO::UDS\_\-MODIFICATION\_\-TIME) const 
\item 
bool {\bf is\-Local\-File} () const 
\item 
const {\bf QString} \& {\bf text} () const 
\item 
const {\bf QString} \& {\bf name} (bool lower\-Case=false) const 
\item 
{\bf QString} {\bf mimetype} () const 
\item 
{\bf KMime\-Type::Ptr} {\bf determine\-Mime\-Type} ()
\item 
{\bf KMime\-Type::Ptr} {\bf mime\-Type\-Ptr} () const 
\item 
bool {\bf is\-Mime\-Type\-Known} () const \label{classKFileItem_a32}

\item 
{\bf QString} {\bf mime\-Comment} ()
\item 
{\bf QString} {\bf icon\-Name} ()
\item 
{\bf QPixmap} {\bf pixmap} (int \_\-size, int \_\-state=0) const 
\item 
int {\bf overlays} () const 
\item 
{\bf QString} {\bf get\-Status\-Bar\-Info} ()
\item 
{\bf QString} {\bf get\-Tool\-Tip\-Text} (int maxcount=6)
\item 
bool {\bf accepts\-Drops} ()
\item 
void {\bf run} ()
\item 
const {\bf KIO::UDSEntry} \& {\bf entry} () const 
\item 
bool {\bf is\-Marked} () const 
\item 
void {\bf mark} ()
\item 
void {\bf unmark} ()
\item 
bool {\bf cmp} (const {\bf KFile\-Item} \&item)
\item 
virtual void {\bf set\-Extra\-Data} (const void $\ast$key, void $\ast$value)
\item 
virtual const void $\ast$ {\bf extra\-Data} (const void $\ast$key) const 
\item 
virtual void $\ast$ {\bf extra\-Data} (const void $\ast$key)
\item 
virtual void {\bf remove\-Extra\-Data} (const void $\ast$key)
\item 
void {\bf set\-Meta\-Info} (const {\bf KFile\-Meta\-Info} \&info)
\item 
const {\bf KFile\-Meta\-Info} \& {\bf meta\-Info} (bool autoget=true, int what=KFile\-Meta\-Info::Fastest) const 
\item 
void {\bf assign} (const {\bf KFile\-Item} \&item)
\item 
void {\bf set\-UDSEntry} (const {\bf KIO::UDSEntry} \&entry, const {\bf KURL} \&url, bool determine\-Mime\-Type\-On\-Demand=false, bool url\-Is\-Directory=false)
\item 
{\bf KFile\-Item} \& {\bf operator=} (const {\bf KFile\-Item} \&)
\item 
{\bf KURL} {\bf most\-Local\-URL} (bool \&local) const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf init} (bool \_\-determine\-Mime\-Type\-On\-Demand)
\item 
void {\bf read\-UDSEntry} (bool \_\-url\-Is\-Directory)
\item 
{\bf QString} {\bf parse\-Permissions} (mode\_\-t perm) const 
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKFileItem_b3}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$<$$<$} ({\bf QData\-Stream} \&s, const {\bf KFile\-Item} \&a)\label{classKFileItem_n0}

\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$>$$>$} ({\bf QData\-Stream} \&s, {\bf KFile\-Item} \&a)\label{classKFileItem_n1}

\end{CompactItemize}


\subsection{Detailed Description}
A KFile\-Item is a generic class to handle a file, local or remote. 

In particular, it makes it easier to handle the result of {\bf KIO::list\-Dir}{\rm (p.\,\pageref{namespaceKIO_a227})} (UDSEntry isn't very friendly to use). It includes many file attributes such as mimetype, icon, text, mode, link... 



Definition at line 40 of file kfileitem.h.

\subsection{Constructor \& Destructor Documentation}
\index{KFileItem@{KFile\-Item}!KFileItem@{KFileItem}}
\index{KFileItem@{KFileItem}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Item::KFile\-Item (const {\bf KIO::UDSEntry} \& {\em \_\-entry}, const {\bf KURL} \& {\em \_\-url}, bool {\em \_\-determine\-Mime\-Type\-On\-Demand} = {\tt false}, bool {\em \_\-url\-Is\-Directory} = {\tt false})}\label{classKFileItem_a0}


Creates an item representing a file, from a UDSEntry. 

This is the preferred constructor when using {\bf KIO::list\-Dir()}{\rm (p.\,\pageref{namespaceKIO_a227})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-entry}]the {\bf KIO}{\rm (p.\,\pageref{namespaceKIO})} entry used to get the file, contains info about it \item[{\em \_\-url}]the file url \item[{\em \_\-determine\-Mime\-Type\-On\-Demand}]specifies if the mimetype of the given URL should be determined immediately or on demand \item[{\em \_\-url\-Is\-Directory}]specifies if the url is just the directory of the fileitem and the filename from the UDSEntry should be used. \end{description}
\end{Desc}


Definition at line 54 of file kfileitem.cpp.

References init(), is\-Local\-File(), and read\-UDSEntry().\index{KFileItem@{KFile\-Item}!KFileItem@{KFileItem}}
\index{KFileItem@{KFileItem}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Item::KFile\-Item (mode\_\-t {\em \_\-mode}, mode\_\-t {\em \_\-permissions}, const {\bf KURL} \& {\em \_\-url}, bool {\em \_\-determine\-Mime\-Type\-On\-Demand} = {\tt false})}\label{classKFileItem_a1}


Creates an item representing a file, from all the necessary info for it. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-mode}]the file mode (according to stat() (e.g. S\_\-IFDIR...) Set to KFile\-Item::Unknown if unknown. For local files, KFile\-Item will use stat(). \item[{\em \_\-permissions}]the access permissions If you set both the mode and the permissions, you save a ::stat() for local files. Set to KFile\-Item::Unknown if you don't know the mode or the permission. \item[{\em \_\-url}]the file url\item[{\em \_\-determine\-Mime\-Type\-On\-Demand}]specify if the mimetype of the given URL should be determined immediately or on demand \end{description}
\end{Desc}


Definition at line 71 of file kfileitem.cpp.

References init().\index{KFileItem@{KFile\-Item}!KFileItem@{KFileItem}}
\index{KFileItem@{KFileItem}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Item::KFile\-Item (const {\bf KURL} \& {\em url}, const {\bf QString} \& {\em mime\-Type}, mode\_\-t {\em mode})}\label{classKFileItem_a2}


Creates an item representing a file, for which the mimetype is already known. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]the file url \item[{\em mime\-Type}]the name of the file's mimetype \item[{\em mode}]the mode (S\_\-IFDIR...) \end{description}
\end{Desc}


Definition at line 88 of file kfileitem.cpp.

References init(), and KMime\-Type::mime\-Type().\index{KFileItem@{KFile\-Item}!KFileItem@{KFileItem}}
\index{KFileItem@{KFileItem}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Item::KFile\-Item (const {\bf KFile\-Item} \& {\em item})}\label{classKFileItem_a3}


Copy constructor. 

Note that extra-data set via {\bf set\-Extra\-Data()}{\rm (p.\,\pageref{classKFileItem_a46})} is not deeply copied -- just the pointers are copied. 

Definition at line 107 of file kfileitem.cpp.

References assign().\index{KFileItem@{KFile\-Item}!~KFileItem@{$\sim$KFileItem}}
\index{~KFileItem@{$\sim$KFileItem}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFile\-Item::$\sim${\bf KFile\-Item} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileItem_a4}


Destructs the KFile\-Item. 

Extra data set via {\bf set\-Extra\-Data()}{\rm (p.\,\pageref{classKFileItem_a46})} is not deleted. 

Definition at line 119 of file kfileitem.cpp.

\subsection{Member Function Documentation}
\index{KFileItem@{KFile\-Item}!refresh@{refresh}}
\index{refresh@{refresh}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::refresh ()}\label{classKFileItem_a5}


Throw away and re-read (for local files) all information about the file. 

This is called when the \_\-file\_\- changes. 

Definition at line 250 of file kfileitem.cpp.

References init().\index{KFileItem@{KFile\-Item}!refreshMimeType@{refreshMimeType}}
\index{refreshMimeType@{refreshMimeType}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::refresh\-Mime\-Type ()}\label{classKFileItem_a6}


Re-reads mimetype information. 

This is called when the mimetype database changes. 

Definition at line 267 of file kfileitem.cpp.

References init().\index{KFileItem@{KFile\-Item}!url@{url}}
\index{url@{url}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KURL}\& KFile\-Item::url () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a7}


Returns the url of the file. 

\begin{Desc}
\item[Returns:]the url of the file \end{Desc}


Definition at line 112 of file kfileitem.h.

Referenced by determine\-Mime\-Type(), icon\-Name(), init(), KDir\-Operator::insert\-New\-Files(), KProperties\-Dialog::KProperties\-Dialog(), meta\-Info(), mime\-Comment(), most\-Local\-URL(), KFile\-Tree\-View\-Item::path(), pixmap(), run(), set\-URL(), and KFile\-Tree\-View\-Item::url().\index{KFileItem@{KFile\-Item}!setURL@{setURL}}
\index{setURL@{setURL}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::set\-URL (const {\bf KURL} \& {\em url})}\label{classKFileItem_a8}


Sets the item's URL. 

Do not call unless you know what you are doing! (used for example when an item got renamed). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]the item's URL \end{description}
\end{Desc}


Definition at line 273 of file kfileitem.cpp.

References KURL::file\-Name(), set\-Name(), and url().\index{KFileItem@{KFile\-Item}!setName@{setName}}
\index{setName@{setName}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::set\-Name (const {\bf QString} \& {\em name})}\label{classKFileItem_a9}


Sets the item's name (i.e. 

the filename). This is automatically done by set\-URL, to set the name from the URL's file\-Name(). This method is provided for some special cases like relative paths as names (KFind\-Part) \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the item's name \end{description}
\end{Desc}


Definition at line 279 of file kfileitem.cpp.

References KIO::decode\-File\-Name(), and name().

Referenced by set\-URL().\index{KFileItem@{KFile\-Item}!permissions@{permissions}}
\index{permissions@{permissions}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}mode\_\-t KFile\-Item::permissions () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a10}


Returns the permissions of the file (stat.st\_\-mode containing only permissions). 

\begin{Desc}
\item[Returns:]the permissions of the file \end{Desc}


Definition at line 133 of file kfileitem.h.

Referenced by KFile\-Permissions\-Props\-Plugin::KFile\-Permissions\-Props\-Plugin().\index{KFileItem@{KFile\-Item}!permissionsString@{permissionsString}}
\index{permissionsString@{permissionsString}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::permissions\-String () const}\label{classKFileItem_a11}


Returns the access permissions for the file as a string. 

\begin{Desc}
\item[Returns:]the access persmission as string \end{Desc}


Definition at line 880 of file kfileitem.cpp.

References QString::is\-Null(), and parse\-Permissions().

Referenced by KFile\-List\-View\-Item::init().\index{KFileItem@{KFile\-Item}!mode@{mode}}
\index{mode@{mode}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}mode\_\-t KFile\-Item::mode () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a12}


Returns the file type (stat.st\_\-mode containing only S\_\-IFDIR, S\_\-IFLNK, ...). 

\begin{Desc}
\item[Returns:]the file type \end{Desc}


Definition at line 145 of file kfileitem.h.

Referenced by accepts\-Drops(), init(), and KFile\-Props\-Plugin::KFile\-Props\-Plugin().\index{KFileItem@{KFile\-Item}!user@{user}}
\index{user@{user}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::user () const}\label{classKFileItem_a13}


Returns the owner of the file. 

\begin{Desc}
\item[Returns:]the file's owner \end{Desc}


Definition at line 391 of file kfileitem.cpp.

References QString::from\-Local8Bit(), QString::is\-Empty(), KURL::path(), and user().

Referenced by get\-Tool\-Tip\-Text(), KFile\-List\-View\-Item::init(), KFile\-Permissions\-Props\-Plugin::KFile\-Permissions\-Props\-Plugin(), and user().\index{KFileItem@{KFile\-Item}!group@{group}}
\index{group@{group}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::group () const}\label{classKFileItem_a14}


Returns the group of the file. 

\begin{Desc}
\item[Returns:]the file's group \end{Desc}


Definition at line 406 of file kfileitem.cpp.

References QString::from\-Local8Bit(), group(), QString::is\-Empty(), KURL::path(), and QString::sprintf().

Referenced by get\-Tool\-Tip\-Text(), group(), KFile\-List\-View\-Item::init(), and KFile\-Permissions\-Props\-Plugin::KFile\-Permissions\-Props\-Plugin().\index{KFileItem@{KFile\-Item}!isLink@{isLink}}
\index{isLink@{isLink}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Link () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a15}


Returns true if this item represents a link in the UNIX sense of a link. 

\begin{Desc}
\item[Returns:]true if the file is a link \end{Desc}


Definition at line 164 of file kfileitem.h.

Referenced by KFile\-Permissions\-Props\-Plugin::KFile\-Permissions\-Props\-Plugin(), KFile\-Props\-Plugin::KFile\-Props\-Plugin(), and parse\-Permissions().\index{KFileItem@{KFile\-Item}!isDir@{isDir}}
\index{isDir@{isDir}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Dir () const}\label{classKFileItem_a16}


Returns true if this item represents a directory. 

\begin{Desc}
\item[Returns:]true if the item is a directory \end{Desc}


Definition at line 606 of file kfileitem.cpp.

References endl(), and kd\-Debug().

Referenced by KDir\-Operator::insert\-New\-Files(), KFile\-Tree\-View\-Item::is\-Dir(), KDir\-Lister::items\-For\-Dir(), KFile\-Permissions\-Props\-Plugin::KFile\-Permissions\-Props\-Plugin(), KFile\-Props\-Plugin::KFile\-Props\-Plugin(), KDir\-Lister::matches\-Filter(), parse\-Permissions(), KDir\-Operator::prepare\-Completion\-Objects(), KFile\-Dialog::set\-Selection(), and KFile\-Icon\-View::set\-Sorting().\index{KFileItem@{KFile\-Item}!isFile@{isFile}}
\index{isFile@{isFile}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-File () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a17}


Returns true if this item represents a file (and not a a directory). 

\begin{Desc}
\item[Returns:]true if the item is a file \end{Desc}


Definition at line 176 of file kfileitem.h.\index{KFileItem@{KFile\-Item}!isReadable@{isReadable}}
\index{isReadable@{isReadable}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Readable () const}\label{classKFileItem_a18}


Checks whether the file or directory is readable. 

In some cases (remote files), we may return true even though it can't be read. \begin{Desc}
\item[Returns:]true if the file can be read - more precisely, false if we know for sure it can't \end{Desc}


Definition at line 556 of file kfileitem.cpp.

References KURL::path().

Referenced by overlays().\index{KFileItem@{KFile\-Item}!isWritable@{isWritable}}
\index{isWritable@{isWritable}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Writable () const}\label{classKFileItem_a19}


Checks whether the file or directory is writable. 

In some cases (remote files), we may return true even though it can't be written to. \begin{Desc}
\item[Returns:]true if the file or directory can be written to - more precisely, false if we know for sure it can't \end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}


Definition at line 577 of file kfileitem.cpp.

References KURL::path().

Referenced by accepts\-Drops().\index{KFileItem@{KFile\-Item}!isHidden@{isHidden}}
\index{isHidden@{isHidden}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Hidden () const}\label{classKFileItem_a20}


Checks whether the file is hidden. 

\begin{Desc}
\item[Returns:]true if the file is hidden. \end{Desc}


Definition at line 598 of file kfileitem.cpp.

References KURL::file\-Name(), and KURL::is\-Empty().

Referenced by overlays().\index{KFileItem@{KFile\-Item}!linkDest@{linkDest}}
\index{linkDest@{linkDest}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::link\-Dest () const}\label{classKFileItem_a21}


Returns the link destination if {\bf is\-Link()}{\rm (p.\,\pageref{classKFileItem_a15})} == true. 

\begin{Desc}
\item[Returns:]the link destination. QString::null if the item is not a link \end{Desc}


Definition at line 285 of file kfileitem.cpp.

References QValue\-List::begin(), QFile::decode\-Name(), QValue\-List::end(), and KURL::path().

Referenced by get\-Status\-Bar\-Info(), get\-Tool\-Tip\-Text(), KFile\-Props\-Plugin::KFile\-Props\-Plugin(), and run().\index{KFileItem@{KFile\-Item}!localPath@{localPath}}
\index{localPath@{localPath}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::local\-Path () const}\label{classKFileItem_a22}


Returns the local path if {\bf is\-Local\-File()}{\rm (p.\,\pageref{classKFileItem_a26})} == true or the {\bf KIO}{\rm (p.\,\pageref{namespaceKIO})} item has a UDS\_\-LOCAL\_\-PATH atom. 

\begin{Desc}
\item[Returns:]the item local path, or QString::null if not known \end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}


Definition at line 306 of file kfileitem.cpp.

References QValue\-List::begin(), QValue\-List::end(), and KURL::path().

Referenced by most\-Local\-URL(), and KProperties\-Dialog::show\-Dialog().\index{KFileItem@{KFile\-Item}!size@{size}}
\index{size@{size}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIO::filesize\_\-t} KFile\-Item::size () const}\label{classKFileItem_a23}


Returns the size of the file, if known. 

\begin{Desc}
\item[Returns:]the file size, or 0 if not known \end{Desc}


Definition at line 325 of file kfileitem.cpp.

References QValue\-List::begin(), QValue\-List::end(), and KURL::path().

Referenced by cmp(), get\-Status\-Bar\-Info(), get\-Tool\-Tip\-Text(), KFile\-List\-View\-Item::init(), KFile\-Props\-Plugin::KFile\-Props\-Plugin(), and KFile\-Icon\-View::set\-Sorting().\index{KFileItem@{KFile\-Item}!time@{time}}
\index{time@{time}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}time\_\-t KFile\-Item::time (unsigned int {\em which}) const}\label{classKFileItem_a24}


Requests the modification, access or creation time, depending on {\tt which}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em which}]UDS\_\-MODIFICATION\_\-TIME, UDS\_\-ACCESS\_\-TIME or even UDS\_\-CREATION\_\-TIME \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the time asked for, (time\_\-t)0 if not available \end{Desc}
\begin{Desc}
\item[See also:]{\bf time\-String()}{\rm (p.\,\pageref{classKFileItem_a25})} \end{Desc}


Definition at line 347 of file kfileitem.cpp.

References QValue\-List::begin(), QValue\-List::end(), and KURL::path().

Referenced by cmp(), KFile\-Props\-Plugin::KFile\-Props\-Plugin(), KFile\-Icon\-View::set\-Sorting(), and time\-String().\index{KFileItem@{KFile\-Item}!timeString@{timeString}}
\index{timeString@{timeString}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::time\-String (unsigned int {\em which} = {\tt KIO::UDS\_\-MODIFICATION\_\-TIME}) const}\label{classKFileItem_a25}


Requests the modification, access or creation time as a string, depending on {\tt which}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em which}]UDS\_\-MODIFICATION\_\-TIME, UDS\_\-ACCESS\_\-TIME or even UDS\_\-CREATION\_\-TIME \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a formatted string of the requested time. \end{Desc}
\begin{Desc}
\item[See also:]{\bf time}{\rm (p.\,\pageref{classKFileItem_a24})} \end{Desc}


Definition at line 922 of file kfileitem.cpp.

References KLocale::format\-Date\-Time(), KGlobal::locale(), QDate\-Time::set\-Time\_\-t(), and time().

Referenced by get\-Tool\-Tip\-Text(), and KFile\-List\-View\-Item::init().\index{KFileItem@{KFile\-Item}!isLocalFile@{isLocalFile}}
\index{isLocalFile@{isLocalFile}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Local\-File () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a26}


Returns true if the file is a local file. 

\begin{Desc}
\item[Returns:]true if the file is local, false otherwise \end{Desc}


Definition at line 242 of file kfileitem.h.

Referenced by KFile\-Item().\index{KFileItem@{KFile\-Item}!text@{text}}
\index{text@{text}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QString}\& KFile\-Item::text () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a27}


Returns the text of the file item. 

It's not exactly the filename since some decoding happens ('\%2F'-$>$'/'). \begin{Desc}
\item[Returns:]the text of the file item \end{Desc}


Definition at line 249 of file kfileitem.h.

Referenced by get\-Status\-Bar\-Info(), get\-Tool\-Tip\-Text(), KFile\-List\-View\-Item::init(), KDir\-Lister::matches\-Filter(), and KFile\-Icon\-View::set\-Sorting().\index{KFileItem@{KFile\-Item}!name@{name}}
\index{name@{name}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QString}\& KFile\-Item::name (bool {\em lower\-Case} = {\tt false}) const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a28}


Return the name of the file item (without a path). 

Similar to {\bf text()}{\rm (p.\,\pageref{classKFileItem_a27})}, but unencoded, i.e. the original name. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lower\-Case}]if true, the name will be returned in lower case, which is useful to speed up sorting by name, case insensitively. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the file's name \end{Desc}


Definition at line 258 of file kfileitem.h.

References QString::lower().

Referenced by KFile\-Props\-Plugin::KFile\-Props\-Plugin(), KFile\-Dialog::multi\-Selection\-Changed(), KDir\-Operator::prepare\-Completion\-Objects(), KFile\-View::set\-Current\-Item(), and set\-Name().\index{KFileItem@{KFile\-Item}!mimetype@{mimetype}}
\index{mimetype@{mimetype}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::mimetype () const}\label{classKFileItem_a29}


Returns the mimetype of the file item. 

If {\tt \_\-determine\-Mime\-Type\-On\-Demand} was used in the constructor, this will determine the mimetype first. Equivalent to {\bf determine\-Mime\-Type()}{\rm (p.\,\pageref{classKFileItem_a30})}-$>${\bf name()}{\rm (p.\,\pageref{classKFileItem_a28})} \begin{Desc}
\item[Returns:]the mime type of the file \end{Desc}


Definition at line 427 of file kfileitem.cpp.

References determine\-Mime\-Type().

Referenced by accepts\-Drops(), cmp(), KFile\-Props\-Plugin::KFile\-Props\-Plugin(), KDir\-Lister::matches\-Mime\-Filter(), and meta\-Info().\index{KFileItem@{KFile\-Item}!determineMimeType@{determineMimeType}}
\index{determineMimeType@{determineMimeType}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMime\-Type::Ptr} KFile\-Item::determine\-Mime\-Type ()}\label{classKFileItem_a30}


Returns the mimetype of the file item. 

If \_\-determine\-Mime\-Type\-On\-Demand was used in the constructor, this will determine the mimetype first. \begin{Desc}
\item[Returns:]the mime type \end{Desc}


Definition at line 433 of file kfileitem.cpp.

References KMime\-Type::find\-By\-URL(), most\-Local\-URL(), and url().

Referenced by assign(), get\-Status\-Bar\-Info(), icon\-Name(), mime\-Comment(), and mimetype().\index{KFileItem@{KFile\-Item}!mimeTypePtr@{mimeTypePtr}}
\index{mimeTypePtr@{mimeTypePtr}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMime\-Type::Ptr} KFile\-Item::mime\-Type\-Ptr () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a31}


Returns the currently known mimetype of the file item. 

This will not try to determine the mimetype if unknown. \begin{Desc}
\item[Returns:]the known mime type \end{Desc}


Definition at line 288 of file kfileitem.h.\index{KFileItem@{KFile\-Item}!mimeComment@{mimeComment}}
\index{mimeComment@{mimeComment}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::mime\-Comment ()}\label{classKFileItem_a33}


Returns the descriptive comment for this mime type, or the mime type itself if none is present. 

\begin{Desc}
\item[Returns:]the mime type description, or the mime type itself \end{Desc}


Definition at line 456 of file kfileitem.cpp.

References determine\-Mime\-Type(), QString::is\-Empty(), most\-Local\-URL(), and url().

Referenced by get\-Status\-Bar\-Info(), get\-Tool\-Tip\-Text(), and KFile\-Props\-Plugin::KFile\-Props\-Plugin().\index{KFileItem@{KFile\-Item}!iconName@{iconName}}
\index{iconName@{iconName}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::icon\-Name ()}\label{classKFileItem_a34}


Returns the full path name to the icon that represents this mime type. 

\begin{Desc}
\item[Returns:]icon\-Name the name of the file's icon \end{Desc}


Definition at line 471 of file kfileitem.cpp.

References determine\-Mime\-Type(), most\-Local\-URL(), and url().\index{KFileItem@{KFile\-Item}!pixmap@{pixmap}}
\index{pixmap@{pixmap}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KFile\-Item::pixmap (int {\em \_\-size}, int {\em \_\-state} = {\tt 0}) const}\label{classKFileItem_a35}


Returns a pixmap representing the file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-size}]Size for the pixmap in pixels. Zero will return the globally configured default size. \item[{\em \_\-state}]The state of the icon: {\bf KIcon::Default\-State}, {\bf KIcon::Active\-State} or {\bf KIcon::Disabled\-State}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the pixmap \end{Desc}


Definition at line 510 of file kfileitem.cpp.

References endl(), KURL::file\-Name(), KMime\-Type::find\-By\-URL(), QString::is\-Empty(), QPixmap::is\-Null(), kd\-Warning(), QString::left(), QString::length(), KMime\-Type::mime\-Type(), most\-Local\-URL(), overlays(), KURL::path(), QString::right(), KURL::set\-Path(), KGlobal::static\-QString(), and url().

Referenced by KFile\-List\-View\-Item::init(), and KFile\-Detail\-View::update\-View().\index{KFileItem@{KFile\-Item}!overlays@{overlays}}
\index{overlays@{overlays}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KFile\-Item::overlays () const}\label{classKFileItem_a36}


Returns the overlays (bitfield of {\bf KIcon}::$\ast$Overlay flags) that are used for this item's pixmap. 

Overlays are used to show for example, whether a file can be modified. \begin{Desc}
\item[Returns:]the overlays of the pixmap \end{Desc}


Definition at line 482 of file kfileitem.cpp.

References KURL::file\-Name(), KNFSShare::instance(), KNFSShare::is\-Directory\-Shared(), is\-Hidden(), is\-Readable(), KURL::path(), and QString::right().

Referenced by pixmap().\index{KFileItem@{KFile\-Item}!getStatusBarInfo@{getStatusBarInfo}}
\index{getStatusBarInfo@{getStatusBarInfo}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::get\-Status\-Bar\-Info ()}\label{classKFileItem_a37}


Returns the string to be displayed in the statusbar, e.g. 

when the mouse is over this item \begin{Desc}
\item[Returns:]the status bar information \end{Desc}


Definition at line 645 of file kfileitem.cpp.

References QString::arg(), determine\-Mime\-Type(), QString::is\-Empty(), link\-Dest(), mime\-Comment(), size(), and text().\index{KFileItem@{KFile\-Item}!getToolTipText@{getToolTipText}}
\index{getToolTipText@{getToolTipText}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::get\-Tool\-Tip\-Text (int {\em maxcount} = {\tt 6})}\label{classKFileItem_a38}


Returns the string to be displayed in the tool tip when the mouse is over this item. 

This may load a plugin to determine additional information specific to the mimetype of the file.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em maxcount}]the maximum number of entries shown \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the tool tip string \end{Desc}


Definition at line 681 of file kfileitem.cpp.

References QString::append(), QString::arg(), KFile\-Meta\-Info\-Item::attributes(), QStyle\-Sheet::escape(), group(), QString::is\-Empty(), KFile\-Meta\-Info::is\-Empty(), KFile\-Meta\-Info\-Item::is\-Valid(), KFile\-Meta\-Info::is\-Valid(), KFile\-Meta\-Info::item(), QString::length(), link\-Dest(), meta\-Info(), mime\-Comment(), parse\-Permissions(), KFile\-Meta\-Info::preferred\-Keys(), size(), KFile\-Meta\-Info\-Item::string(), text(), time\-String(), KFile\-Meta\-Info\-Item::translated\-Key(), QString::truncate(), and user().\index{KFileItem@{KFile\-Item}!acceptsDrops@{acceptsDrops}}
\index{acceptsDrops@{acceptsDrops}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::accepts\-Drops ()}\label{classKFileItem_a39}


Returns true if files can be dropped over this item. 

Contrary to popular belief, not only dirs will return true :) Executables, .desktop files, will do so as well. \begin{Desc}
\item[Returns:]true if you can drop files over the item \end{Desc}


Definition at line 624 of file kfileitem.cpp.

References is\-Writable(), mimetype(), mode(), and KURL::path().\index{KFileItem@{KFile\-Item}!run@{run}}
\index{run@{run}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::run ()}\label{classKFileItem_a40}


Let's \char`\"{}KRun\char`\"{} this file ! (e.g. 

when file is clicked or double-clicked or return is pressed) 

Definition at line 758 of file kfileitem.cpp.

References link\-Dest(), most\-Local\-URL(), and url().\index{KFileItem@{KFile\-Item}!entry@{entry}}
\index{entry@{entry}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KIO::UDSEntry}\& KFile\-Item::entry () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a41}


Returns the UDS entry. 

Used by the tree view to access all details by position. \begin{Desc}
\item[Returns:]the UDS entry \end{Desc}


Definition at line 359 of file kfileitem.h.\index{KFileItem@{KFile\-Item}!isMarked@{isMarked}}
\index{isMarked@{isMarked}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::is\-Marked () const\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a42}


Used when updating a directory. 

marked == seen when refreshing. \begin{Desc}
\item[Returns:]true if the file item is marked \end{Desc}


Definition at line 365 of file kfileitem.h.\index{KFileItem@{KFile\-Item}!mark@{mark}}
\index{mark@{mark}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::mark ()\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a43}


Marks the item. 

\begin{Desc}
\item[See also:]{\bf is\-Marked()}{\rm (p.\,\pageref{classKFileItem_a42})} \end{Desc}


Definition at line 370 of file kfileitem.h.\index{KFileItem@{KFile\-Item}!unmark@{unmark}}
\index{unmark@{unmark}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::unmark ()\hspace{0.3cm}{\tt  [inline]}}\label{classKFileItem_a44}


Unmarks the item. 

\begin{Desc}
\item[See also:]{\bf is\-Marked()}{\rm (p.\,\pageref{classKFileItem_a42})} \end{Desc}


Definition at line 375 of file kfileitem.h.\index{KFileItem@{KFile\-Item}!cmp@{cmp}}
\index{cmp@{cmp}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Item::cmp (const {\bf KFile\-Item} \& {\em item})}\label{classKFileItem_a45}


Somewhat like a comparison operator, but more explicit. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]the item to compare \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if all values are equal \end{Desc}


Definition at line 770 of file kfileitem.cpp.

References mimetype(), size(), and time().\index{KFileItem@{KFile\-Item}!setExtraData@{setExtraData}}
\index{setExtraData@{setExtraData}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::set\-Extra\-Data (const void $\ast$ {\em key}, void $\ast$ {\em value})\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileItem_a46}


This allows to associate some \char`\"{}extra\char`\"{} data to a KFile\-Item. 

As one KFile\-Item can be used by several objects (often views) which all need to add some data, you have to use a key to reference your extra data within the KFile\-Item.

That way a KFile\-Item can hold and provide access to all those views separately.

I.e. a {\bf KFile\-Icon\-View}{\rm (p.\,\pageref{classKFileIconView})} that associates a {\bf KFile\-Icon\-View\-Item}{\rm (p.\,\pageref{classKFileIconViewItem})} (an item suitable for use with {\bf QIcon\-View}) does



\footnotesize\begin{verbatim} kfileItem->setExtraData( this, iconViewItem );
\end{verbatim}
\normalsize


and can later access the icon\-View\-Item by doing



\footnotesize\begin{verbatim} KFileIconViewItem *iconViewItem = static_cast<KFileIconViewItem*>( kfileItem->extraData( this ));
\end{verbatim}
\normalsize


This is usually more efficient then having every view associate data to items by using a separate {\bf QDict} or {\bf QMap}.

Note: you have to remove and destroy the data you associated yourself when you don't need it anymore!

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key of the extra data \item[{\em value}]the value of the extra data \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf extra\-Data}{\rm (p.\,\pageref{classKFileItem_a47})} 

{\bf remove\-Extra\-Data}{\rm (p.\,\pageref{classKFileItem_a49})} \end{Desc}


Definition at line 851 of file kfileitem.cpp.

References QMap::replace().\index{KFileItem@{KFile\-Item}!extraData@{extraData}}
\index{extraData@{extraData}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const void $\ast$ KFile\-Item::extra\-Data (const void $\ast$ {\em key}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileItem_a47}


Retrieves the extra data with the given {\tt key}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key of the extra data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the extra data associated to an item with {\tt key} via set\-Extra\-Data. 0L if nothing was associated with {\tt key}. \end{Desc}
\begin{Desc}
\item[See also:]{\bf extra\-Data}{\rm (p.\,\pageref{classKFileItem_a47})} \end{Desc}


Definition at line 859 of file kfileitem.cpp.

References QMap\-Const\-Iterator::data(), QMap::end(), and QMap::find().

Referenced by KFile\-Detail\-View::ensure\-Item\-Visible(), KFile\-Tree\-View::find\-Item(), and KFile\-Tree\-Branch::find\-TVIBy\-URL().\index{KFileItem@{KFile\-Item}!extraData@{extraData}}
\index{extraData@{extraData}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ KFile\-Item::extra\-Data (const void $\ast$ {\em key})\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileItem_a48}


Retrieves the extra data with the given {\tt key}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key of the extra data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the extra data associated to an item with {\tt key} via set\-Extra\-Data. 0L if nothing was associated with {\tt key}. \end{Desc}
\begin{Desc}
\item[See also:]{\bf extra\-Data}{\rm (p.\,\pageref{classKFileItem_a47})} \end{Desc}


Definition at line 867 of file kfileitem.cpp.

References QMap\-Iterator::data(), QMap::end(), and QMap::find().\index{KFileItem@{KFile\-Item}!removeExtraData@{removeExtraData}}
\index{removeExtraData@{removeExtraData}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::remove\-Extra\-Data (const void $\ast$ {\em key})\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileItem_a49}


Removes the extra data associated with an item via {\tt key}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key of the extra data to remove \end{description}
\end{Desc}


Definition at line 875 of file kfileitem.cpp.

References QMap::remove().\index{KFileItem@{KFile\-Item}!setMetaInfo@{setMetaInfo}}
\index{setMetaInfo@{setMetaInfo}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::set\-Meta\-Info (const {\bf KFile\-Meta\-Info} \& {\em info})}\label{classKFileItem_a50}


Sets the metainfo of this item to {\tt info}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em info}]the new meta info \end{description}
\end{Desc}


Definition at line 929 of file kfileitem.cpp.

Referenced by KFile\-Meta\-Props\-Plugin::KFile\-Meta\-Props\-Plugin().\index{KFileItem@{KFile\-Item}!metaInfo@{metaInfo}}
\index{metaInfo@{metaInfo}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KFile\-Meta\-Info} \& KFile\-Item::meta\-Info (bool {\em autoget} = {\tt true}, int {\em what} = {\tt KFileMetaInfo::Fastest}) const}\label{classKFileItem_a51}


Returns the metainfo of this item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em autoget}]if true, the metainfo will automatically be created \item[{\em what}]ignored \end{description}
\end{Desc}


Definition at line 934 of file kfileitem.cpp.

References KFile\-Meta\-Info::is\-Valid(), mimetype(), most\-Local\-URL(), KGlobal\-Settings::show\-File\-Preview(), and url().

Referenced by get\-Tool\-Tip\-Text(), and KFile\-Meta\-Props\-Plugin::KFile\-Meta\-Props\-Plugin().\index{KFileItem@{KFile\-Item}!assign@{assign}}
\index{assign@{assign}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::assign (const {\bf KFile\-Item} \& {\em item})}\label{classKFileItem_a52}


Somewhat like an assignment operator, but more explicit. 

Note: extra-data set with {\bf set\-Extra\-Data()}{\rm (p.\,\pageref{classKFileItem_a46})} is not copied, so be careful what you do!

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]the item to copy \end{description}
\end{Desc}


Definition at line 785 of file kfileitem.cpp.

References determine\-Mime\-Type().

Referenced by KFile\-Item(), and operator=().\index{KFileItem@{KFile\-Item}!setUDSEntry@{setUDSEntry}}
\index{setUDSEntry@{setUDSEntry}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::set\-UDSEntry (const {\bf KIO::UDSEntry} \& {\em entry}, const {\bf KURL} \& {\em url}, bool {\em determine\-Mime\-Type\-On\-Demand} = {\tt false}, bool {\em url\-Is\-Directory} = {\tt false})}\label{classKFileItem_a53}


Reinitialize KFile\-Item with a new UDSEntry. 

Note: extra-data set with {\bf set\-Extra\-Data()}{\rm (p.\,\pageref{classKFileItem_a46})} is not changed or deleted, so be careful what you do!

KDir\-Lister\-Cache uses it to save new/delete calls by updating existing items that are otherwise not needed anymore.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em entry}]the UDSEntry to assign to this KFile\-Item \item[{\em url}]the file url \item[{\em determine\-Mime\-Type\-On\-Demand}]specifies if the mimetype of the given URL should be determined immediately or on demand \item[{\em url\-Is\-Directory}]specifies if the url is just the directory of the fileitem and the filename from the UDSEntry should be used. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4.1 \end{Desc}


Definition at line 824 of file kfileitem.cpp.

References init(), and read\-UDSEntry().\index{KFileItem@{KFile\-Item}!operator=@{operator=}}
\index{operator=@{operator=}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFile\-Item} \& KFile\-Item::operator= (const {\bf KFile\-Item} \&)}\label{classKFileItem_a54}


Assignment operator, calls {\bf assign()}{\rm (p.\,\pageref{classKFileItem_a52})}. 



Definition at line 113 of file kfileitem.cpp.

References assign().\index{KFileItem@{KFile\-Item}!mostLocalURL@{mostLocalURL}}
\index{mostLocalURL@{mostLocalURL}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KURL} KFile\-Item::most\-Local\-URL (bool \& {\em local}) const}\label{classKFileItem_a55}


Tries to give a local URL for this file item if possible. 

The given boolean indicates if the returned url is local or not. 

Definition at line 948 of file kfileitem.cpp.

References QString::is\-Empty(), local\-Path(), KURL::set\-Path(), and url().

Referenced by determine\-Mime\-Type(), icon\-Name(), init(), meta\-Info(), mime\-Comment(), pixmap(), and run().\index{KFileItem@{KFile\-Item}!init@{init}}
\index{init@{init}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::init (bool {\em \_\-determine\-Mime\-Type\-On\-Demand})\hspace{0.3cm}{\tt  [protected]}}\label{classKFileItem_b0}


Computes the text, mode, and mimetype from the UDSEntry Called by constructor, but can be called again later. 



Definition at line 124 of file kfileitem.cpp.

References QFile::encode\-Name(), KMime\-Type::find\-By\-URL(), KURL::is\-Empty(), KURL::is\-Local\-File(), mode(), most\-Local\-URL(), KURL::path(), and url().

Referenced by KFile\-Item(), refresh(), refresh\-Mime\-Type(), and set\-UDSEntry().\index{KFileItem@{KFile\-Item}!readUDSEntry@{readUDSEntry}}
\index{readUDSEntry@{readUDSEntry}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Item::read\-UDSEntry (bool {\em \_\-url\-Is\-Directory})\hspace{0.3cm}{\tt  [protected]}}\label{classKFileItem_b1}


Extracts the data from the UDSEntry member and updates the KFile\-Item accordingly. 

\begin{Desc}
\item[Since:]3.4.1 \end{Desc}


Definition at line 186 of file kfileitem.cpp.

References KURL::add\-Path(), QValue\-List::begin(), KIO::decode\-File\-Name(), QValue\-List::end(), QString::is\-Empty(), KURL::is\-Local\-File(), KMime\-Type::mime\-Type(), and KGlobal::static\-QString().

Referenced by KFile\-Item(), and set\-UDSEntry().\index{KFileItem@{KFile\-Item}!parsePermissions@{parsePermissions}}
\index{parsePermissions@{parsePermissions}!KFileItem@{KFile\-Item}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFile\-Item::parse\-Permissions (mode\_\-t {\em perm}) const\hspace{0.3cm}{\tt  [protected]}}\label{classKFileItem_b2}


Parses the given permission set and provides it for access(). 



Definition at line 888 of file kfileitem.cpp.

References QString::from\-Latin1(), is\-Dir(), and is\-Link().

Referenced by get\-Tool\-Tip\-Text(), and permissions\-String().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kfileitem.h\item 
kfileitem.cpp\end{CompactItemize}
