Re: [sleuthkit-developers] Help Writing a Module - isMimeType() - SortedSet
Brought to you by:
carrier
|
From: Richard C. <rco...@ba...> - 2018-06-15 18:30:23
|
You could call the following ImageUtils to get a SortedSet of image MIME
types:
public static SortedSet<String> getSupportedImageMimeTypes()
You could also call this FIleTypeDetector method to see all the values that
can be stored in the field returned by AbstractFile.getMIMEType:
/**
* Gets a sorted set of the file types that can be detected: the MIME
types
* detected by Tika (without optional parameters), the custom MIME types
* defined by Autopsy, and any custom MIME types defined by the user.
*
* @return A list of all detectable file types.
*
* @throws FileTypeDetectorInitException If an error occurs while
assembling
* the list of types
*/
public static synchronized SortedSet<String> getDetectedTypes() throws
FileTypeDetectorInitException
On Wed, Jun 13, 2018 at 8:47 PM Edes4ud Kheheb2enud <bee...@gm...>
wrote:
> Hello,
>
> I'm trying to write a module and I am running in to some problems and was
> wondering if anyone could help.
>
> My module is an ingest module. I would like it to run against any file
> with an image mimetype. I'm using the sample ingest module from the 1st
> tutorial as a model and I'm attempting to use:
>
> if file.isMimeType()
>
> I'm having difficulty with the parameter for isMimeType. It is supposed to
> be a sorted set. I guess I am confused on what a sorted set is and what
> format it should be in. I tried passing strings that were a mimetype but
> everything I tried fails. Has anyone had any success filtering files based
> on mimetype?
>
> Rod
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> sleuthkit-developers mailing list
> sle...@li...
> https://lists.sourceforge.net/lists/listinfo/sleuthkit-developers
>
|