I am trying to develop a python plugin which will display a specific directory. Is it possible to display directories? I have managed to create plugins for specific files but couldn’t find any source for directories.
Are you talking about using FileChooser to select a directory instead of a file?
I did not know about FileChooser but I did some research on it. All I could find and understand that it opened a pop up in that specific directory and ‘asked’ which files to choose.
I am actually just looking to create an artifact which will display all the files of a specific folder(which I will hard code). I just need to list the files from a folder and show it in an artifact.
I reckon only modifications needed in ‘previously posted create artifact post’ would be somewhere at the place where we select the files?
fileManager = Case.getCurrentCase().getServices().getFileManager()
files = fileManager.findFiles(dataSource, "com.instagram.android_preferences.xml", ".instagram")
numFiles = len(files)
progressBar.switchToDeterminate(numFiles)
fileCount = 0
for file in files:
if self.context.isJobCancelled():
return IngestModule.ProcessResult.OK
self.log(Level.INFO, "Processing file: " + file.getName())
fileCount += 1
Have you thought about making an interesting File Rule? You can do that for these file types: files, directories or extensions.
I did try the interesting file module for a file before. But I am specifically interested in creating a new artifact to show the contents of that directory since it would be much more visible.