I like it, but it won&#39;t work.<div><br></div><div>Due to the messy internals of Nepomuk::Resource, you&#39;ll have to call <b>determineFinalResourceData() </b>before calling ResourceData::isFile() in Resource. If you don&#39;t do that then you&#39;ll get code like this -</div>
<div><br></div><div>Resource r1(&quot;nepomuk:/res/res-uuid&quot;);</div><div>r1.isFile(); // will always says false even though the resource might be a file</div><div>r1.rating(); // determineUri has now been called internally</div>
<div>r1.isFile(); // now it will return true if the resource is a file</div><div><br></div><div>If you want I could write a patch. I may be wrong, I haven&#39;t looked at the patch that carefully.</div><div><br></div><div>
- Vishesh Handa<br><br><div class="gmail_quote">On Thu, Aug 5, 2010 at 5:17 PM, Sebastian Trüg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi guys,<br>
<br>
I just wanted to hear your opinions on the attached patch which<br>
introduces a Nepomuk:File class derived from Nepomuk::Resource. That new<br>
class has url() and dirResource() methods to handle file resources more<br>
conveniently.<br>
<br>
Cheers,<br>
<font color="#888888">Sebastian<br>
</font><br>_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
<br></blockquote></div><br></div>