English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 25 April 2022, 04:33   #1
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Library to Recognise Filetypes

Update 22/04/25: Added the WhatIs.library that I forgot

Hi there!

I'm looking for a library that analyse files and returns their filetypes. I found Datamaster v2.0, GetType v1.15, FIDLib v8.0, and WhatIs v4.0 but they all seemed abandoned and they do not provide their source code... I know also DefIcons but I could not find or missed its developers' documentation

Would you have any suggestion?

Cheers!

Last edited by tygre; 25 April 2022 at 16:30.
tygre is offline  
Old 25 April 2022, 11:14   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by tygre View Post
I know also DefIcons but I could not find or missed its developers' documentation
It's in the NewIcons archive. But it only describes the format of the deficons.prefs file. You'd have to write the actual recognition code yourself.
thomas is offline  
Old 25 April 2022, 14:42   #3
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi Thomas and thank you!

I thought that this version wasn't maintained anymore and that there was, maybe?, a new version with AmigaOS 3.1.4 and 3.2?

Cheers!
tygre is offline  
Old 25 April 2022, 16:18   #4
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
IIRC whatis.library does just that.
kamelito is offline  
Old 25 April 2022, 16:28   #5
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi Kamelito!

Oh, sorry, I forgot to mention that one in my first post... it has the same problem as the others though AFAIK: it's not maintained and not open sourced, isn't it?

Best!
tygre is offline  
Old 25 April 2022, 16:36   #6
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
The question is what your aim is.

Normally datatypes.library is all you need. It tells you what type a file is for each file supported by datatypes. It even has an ARexx interface.
thomas is offline  
Old 25 April 2022, 16:45   #7
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Good point, sorry for not having explained better!

For AmiModRadio, I'm using file extensions to decide what to do with a module: if the currently-started player can play or not the module.

I've encountered some modules that do not have file extensions but could still be played if they have had one... so I'd like to have a more systematic way of identifying the type of a file.

I will probably have to add many music-related file types myself, so I'm looking for something still maintained and, if possible, opened...

Cheers!
tygre is offline  
Old 09 May 2022, 14:56   #8
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi!

Just "bumping" my question

I read about DefIcons (for example here), which seems to be the engine identifying files, which I'd like to augment with more music formats... but Google couldn't help me find docs about it...

Cheers!
tygre is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ClassicWB OS39 : Default tool for doc FileTypes Amon_RA project.ClassicWB 1 09 May 2016 12:24
Access the DefIcons filetypes settings? AGS Coders. System 9 19 February 2016 20:52
Does anyone recognise this music? pingu Retrogaming General Discussion 2 07 April 2015 02:05
DirOpus 4.16 Filetypes squidbass support.Apps 2 08 February 2015 10:09
How do I associate filetypes with programs? Valhoudini support.WinUAE 8 04 February 2006 18:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:35.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07940 seconds with 13 queries