Skip to content
Advertisement

Java wrapper for Unix file cmd [closed]

I am trying to access some statistics (file type description) of files by executing the ‘file’ command via java. Current implementation using Runtime.exec() and it’s a bit overhead for my application

Is there any pure Java wrapper for Unix file command?

Advertisement

Answer

You can try Files.probeContentType

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement