Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-12

file identification using libmagic

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi,

I have made a header port of libmagic which is used by the file(1) command to identify the type of files. Usage examples are availble, too.

Since it could be of general interest, I'm posting it here. Test it, stick it in LCCR or whatever.

Have fun,
Marc

José Mejuto
to Marc Santhoff
Marc Santhoff wrote
Hi, I have made a header port of libmagic which is used by the file(1) command to identify the type of files. Usage examples are availble, too.

Hello,

Just a note, I was using magic.dll for Windows a few years ago and I was being forced to use dynamic loading as my code must process thousands of streams/files and in magic_close the dll left an allocated memory block and the only way to remove it was unloading the DLL.