Re: how is it possible to write a filter for directories?



> I'd like to add extraordinary information for directories. In every one
> of them a file named content.xml contains these information.
>
> After reading the documentation, I guess a filter is supposed to do this
> job. Is that right? But what is the mime-type for directories? And what
> is within the data blob for them?

The mimetype for directories is inode/directory. But iirc, the filter
for directory is not used.

This is actually hard to do out of the box. There is some support for
.myfile.xmp metadata files, which contain additional metadata for file
'myfile'. But even then I do not remember if that supports
directories.

The main idea is not that complicated - what makes it harder is pickin
up changes if the metadata file is updated/deleted/created on the fly
or the main file is removed and such things. If these are not an issue
for you, e.g. you will only create the index once and the metadata
files are well behaved then you can just read from the corresponding
metadata file and fill up fields in
beagled/FileSystemQueryable/FileSystemQueryable.cs:DirectoryToIndexable()

- dBera

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]