Article 6NZSS [Ruby FileMagic] Checks on ARGF (STDIN)

[Ruby FileMagic] Checks on ARGF (STDIN)

by
Michael Uplawski
from LinuxQuestions.org on (#6NZSS)
Good morning

I must verify Mime-types and/or the Magic of data which is read via STDIN (ARGF in Ruby ... and others) (I presume)

The only thing that I can currently come up with, this morning, under pressure of time, is a temporary file.

So basically, I *can* do what I want. But I find it clumsy and ugly.
AFAIS the obstruction comes from the limited functionality of the FileMagic gem, but I may be erring (StreamMagic or STDINMagic is what I seek, I guess).

Would anybody have a better idea? Do as if I was starting to program and this were my very first project, ever. Wrong project!" would be a pertinent answer, but let us exclude this for now. TY.

TY.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments