How to create a new filetype

Forum thread started by lelldorin on Thu, 2014-03-20 19:59

Hello guys,

how i can create a own fieltype for my applications?

Greetings Lelldorin

Comments

Re: How to create a new filetype

You can find an example how i did it (also its completly outdated because it dont use hvif )
here:
https://code.google.com/p/projectconceptor/source/browse/trunk/src/app/P...

but it should give you maybe a starting point :)

Re: How to create a new filetype

If you want to set the filetype of a data file your application creates maybe my code at: http://www.haikuware.com/directory/view-details/system-files/tracker-add... will be of help.

Re: How to create a new filetype

Give your files their own mime type, and register the mime-type with your application.

FileTypes is your friend.

Re: How to create a new filetype

it's in the documentation: https://www.haiku-os.org/docs/userguide/en/workshop-filetypes+attributes...

If you can get hold of a copy of Hacker's "BeOS Bible", there's a lot more detail there. Also his app TrackerGrep, which consists mostly of bash scripts, makes extensive use of new filetypes IIRC. It might be worth studying.

Re: How to create a new filetype

Thanks for all your help, i will take a look.

Greetings lelldorin

Re: How to create a new filetype

Hi!

Programmatically, have a look at DarkWyrm's lesson 15. It's C++ of course.
Otherwise, there's the Terminal command "mimeset" to register a MIME type and "settype" to assign a file type to a file. I guess there's a system() function to invoke those from within yab.

Regards,
Humdinger