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