Autopsy  4.8.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
PhotoRecCarverFileIngestModule.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2018 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.modules.photoreccarver;
20 
21 import java.io.File;
22 import java.io.IOException;
23 import java.lang.ProcessBuilder.Redirect;
24 import java.nio.file.DirectoryStream;
25 import java.nio.file.FileAlreadyExistsException;
26 import java.nio.file.Files;
27 import java.nio.file.Path;
28 import java.nio.file.Paths;
29 import java.text.DateFormat;
30 import java.text.SimpleDateFormat;
31 import java.util.ArrayList;
32 import java.util.Date;
33 import java.util.HashMap;
34 import java.util.List;
35 import java.util.Map;
36 import java.util.concurrent.ConcurrentHashMap;
37 import java.util.concurrent.atomic.AtomicLong;
38 import java.util.logging.Level;
39 import org.openide.modules.InstalledFileLocator;
40 import org.openide.util.NbBundle;
60 import org.sleuthkit.datamodel.AbstractFile;
61 import org.sleuthkit.datamodel.LayoutFile;
62 import org.sleuthkit.datamodel.ReadContentInputStream.ReadContentInputStreamException;
63 import org.sleuthkit.datamodel.TskData;
64 
69 @NbBundle.Messages({
70  "PhotoRecIngestModule.PermissionsNotSufficient=Insufficient permissions accessing",
71  "PhotoRecIngestModule.PermissionsNotSufficientSeeReference=See 'Shared Drive Authentication' in Autopsy help.",
72  "# {0} - output directory name", "cannotCreateOutputDir.message=Unable to create output directory: {0}.",
73  "unallocatedSpaceProcessingSettingsError.message=The selected file ingest filter ignores unallocated space. This module carves unallocated space. Please choose a filter which does not ignore unallocated space or disable this module.",
74  "unsupportedOS.message=PhotoRec module is supported on Windows platforms only.",
75  "missingExecutable.message=Unable to locate PhotoRec executable.",
76  "cannotRunExecutable.message=Unable to execute PhotoRec.",
77  "PhotoRecIngestModule.nonHostnameUNCPathUsed=PhotoRec cannot operate with a UNC path containing IP addresses."
78 })
79 final class PhotoRecCarverFileIngestModule implements FileIngestModule {
80 
81  static final boolean DEFAULT_CONFIG_KEEP_CORRUPTED_FILES = false;
82 
83  private static final String PHOTOREC_DIRECTORY = "photorec_exec"; //NON-NLS
84  private static final String PHOTOREC_EXECUTABLE = "photorec_win.exe"; //NON-NLS
85  private static final String PHOTOREC_LINUX_EXECUTABLE = "photorec";
86  private static final String PHOTOREC_RESULTS_BASE = "results"; //NON-NLS
87  private static final String PHOTOREC_RESULTS_EXTENDED = "results.1"; //NON-NLS
88  private static final String PHOTOREC_REPORT = "report.xml"; //NON-NLS
89  private static final String LOG_FILE = "run_log.txt"; //NON-NLS
90  private static final String TEMP_DIR_NAME = "temp"; // NON-NLS
91  private static final String SEP = System.getProperty("line.separator");
92  private static final Logger logger = Logger.getLogger(PhotoRecCarverFileIngestModule.class.getName());
93  private static final HashMap<Long, IngestJobTotals> totalsForIngestJobs = new HashMap<>();
94  private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter();
95  private static final Map<Long, WorkingPaths> pathsByJob = new ConcurrentHashMap<>();
96  private IngestJobContext context;
97  private Path rootOutputDirPath;
98  private File executableFile;
99  private IngestServices services;
100  private final UNCPathUtilities uncPathUtilities = new UNCPathUtilities();
101  private long jobId;
102 
103  private final boolean keepCorruptedFiles;
104 
105  private static class IngestJobTotals {
106  private final AtomicLong totalItemsRecovered = new AtomicLong(0);
107  private final AtomicLong totalItemsWithErrors = new AtomicLong(0);
108  private final AtomicLong totalWritetime = new AtomicLong(0);
109  private final AtomicLong totalParsetime = new AtomicLong(0);
110  }
116  PhotoRecCarverFileIngestModule(PhotoRecCarverIngestJobSettings settings) {
117  keepCorruptedFiles = settings.isKeepCorruptedFiles();
118  }
119 
120  private static synchronized IngestJobTotals getTotalsForIngestJobs(long ingestJobId) {
121  IngestJobTotals totals = totalsForIngestJobs.get(ingestJobId);
122  if (totals == null) {
123  totals = new PhotoRecCarverFileIngestModule.IngestJobTotals();
124  totalsForIngestJobs.put(ingestJobId, totals);
125  }
126  return totals;
127  }
128 
129  private static synchronized void initTotalsForIngestJob(long ingestJobId) {
130  IngestJobTotals totals = new PhotoRecCarverFileIngestModule.IngestJobTotals();
131  totalsForIngestJobs.put(ingestJobId, totals);
132  }
133 
137  @Override
138  public void startUp(IngestJobContext context) throws IngestModule.IngestModuleException {
139  this.context = context;
140  this.services = IngestServices.getInstance();
141  this.jobId = this.context.getJobId();
142 
143  // If the global unallocated space processing setting and the module
144  // process unallocated space only setting are not in sych, throw an
145  // exception. Although the result would not be incorrect, it would be
146  // unfortunate for the user to get an accidental no-op for this module.
147  if (!this.context.processingUnallocatedSpace()) {
148  throw new IngestModule.IngestModuleException(Bundle.unallocatedSpaceProcessingSettingsError_message());
149  }
150 
151  this.rootOutputDirPath = createModuleOutputDirectoryForCase();
152 
153  //Set photorec executable directory based on operating system.
154  executableFile = locateExecutable();
155 
156  if (PhotoRecCarverFileIngestModule.refCounter.incrementAndGet(this.jobId) == 1) {
157  try {
158  // The first instance creates an output subdirectory with a date and time stamp
159  DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss-SSSS"); // NON-NLS
160  Date date = new Date();
161  String folder = this.context.getDataSource().getId() + "_" + dateFormat.format(date);
162  Path outputDirPath = Paths.get(this.rootOutputDirPath.toAbsolutePath().toString(), folder);
163  Files.createDirectories(outputDirPath);
164 
165  // A temp subdirectory is also created as a location for writing unallocated space files to disk.
166  Path tempDirPath = Paths.get(outputDirPath.toString(), PhotoRecCarverFileIngestModule.TEMP_DIR_NAME);
167  Files.createDirectory(tempDirPath);
168 
169  // Save the directories for the current job.
170  PhotoRecCarverFileIngestModule.pathsByJob.put(this.jobId, new WorkingPaths(outputDirPath, tempDirPath));
171 
172  // Initialize job totals
173  initTotalsForIngestJob(jobId);
174  } catch (SecurityException | IOException | UnsupportedOperationException ex) {
175  throw new IngestModule.IngestModuleException(Bundle.cannotCreateOutputDir_message(ex.getLocalizedMessage()), ex);
176  }
177  }
178  }
179 
183  @Override
184  public IngestModule.ProcessResult process(AbstractFile file) {
185  // Skip everything except unallocated space files.
186  if (file.getType() != TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS) {
187  return IngestModule.ProcessResult.OK;
188  }
189 
190  // Safely get a reference to the totalsForIngestJobs object
191  IngestJobTotals totals = getTotalsForIngestJobs(jobId);
192 
193  Path tempFilePath = null;
194  try {
195  // Verify initialization succeeded.
196  if (null == this.executableFile) {
197  logger.log(Level.SEVERE, "PhotoRec carver called after failed start up"); // NON-NLS
198  return IngestModule.ProcessResult.ERROR;
199  }
200 
201  // Check that we have roughly enough disk space left to complete the operation
202  // Some network drives always return -1 for free disk space.
203  // In this case, expect enough space and move on.
204  long freeDiskSpace = IngestServices.getInstance().getFreeDiskSpace();
205  if ((freeDiskSpace != IngestMonitor.DISK_FREE_SPACE_UNKNOWN) && ((file.getSize() * 1.2) > freeDiskSpace)) {
206  logger.log(Level.SEVERE, "PhotoRec error processing {0} with {1} Not enough space on primary disk to save unallocated space.", // NON-NLS
207  new Object[]{file.getName(), PhotoRecCarverIngestModuleFactory.getModuleName()}); // NON-NLS
208  MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "PhotoRecIngestModule.UnableToCarve", file.getName()),
209  NbBundle.getMessage(this.getClass(), "PhotoRecIngestModule.NotEnoughDiskSpace"));
210  return IngestModule.ProcessResult.ERROR;
211  }
212  if (this.context.fileIngestIsCancelled() == true) {
213  // if it was cancelled by the user, result is OK
214  logger.log(Level.INFO, "PhotoRec cancelled by user"); // NON-NLS
215  MessageNotifyUtil.Notify.info(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.cancelledByUser"));
216  return IngestModule.ProcessResult.OK;
217  }
218 
219  // Write the file to disk.
220  long writestart = System.currentTimeMillis();
221  WorkingPaths paths = PhotoRecCarverFileIngestModule.pathsByJob.get(this.jobId);
222  tempFilePath = Paths.get(paths.getTempDirPath().toString(), file.getName());
223  ContentUtils.writeToFile(file, tempFilePath.toFile(), context::fileIngestIsCancelled);
224 
225  if (this.context.fileIngestIsCancelled() == true) {
226  // if it was cancelled by the user, result is OK
227  logger.log(Level.INFO, "PhotoRec cancelled by user"); // NON-NLS
228  MessageNotifyUtil.Notify.info(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.cancelledByUser"));
229  return IngestModule.ProcessResult.OK;
230  }
231 
232  // Create a subdirectory for this file.
233  Path outputDirPath = Paths.get(paths.getOutputDirPath().toString(), file.getName());
234  Files.createDirectory(outputDirPath);
235  File log = new File(Paths.get(outputDirPath.toString(), LOG_FILE).toString()); //NON-NLS
236 
237  // Scan the file with Unallocated Carver.
238  ProcessBuilder processAndSettings = new ProcessBuilder(
239  executableFile.toString(),
240  "/d", // NON-NLS
241  outputDirPath.toAbsolutePath().toString() + File.separator + PHOTOREC_RESULTS_BASE,
242  "/cmd", // NON-NLS
243  tempFilePath.toFile().toString());
244  if (keepCorruptedFiles) {
245  processAndSettings.command().add("options,keep_corrupted_file,search"); // NON-NLS
246  } else {
247  processAndSettings.command().add("search"); // NON-NLS
248  }
249 
250  // Add environment variable to force PhotoRec to run with the same permissions Autopsy uses
251  processAndSettings.environment().put("__COMPAT_LAYER", "RunAsInvoker"); //NON-NLS
252  processAndSettings.redirectErrorStream(true);
253  processAndSettings.redirectOutput(Redirect.appendTo(log));
254 
255  FileIngestModuleProcessTerminator terminator = new FileIngestModuleProcessTerminator(this.context, true);
256  int exitValue = ExecUtil.execute(processAndSettings, terminator);
257 
258  if (this.context.fileIngestIsCancelled() == true) {
259  // if it was cancelled by the user, result is OK
260  cleanup(outputDirPath, tempFilePath);
261  logger.log(Level.INFO, "PhotoRec cancelled by user"); // NON-NLS
262  MessageNotifyUtil.Notify.info(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.cancelledByUser"));
263  return IngestModule.ProcessResult.OK;
264  } else if (terminator.getTerminationCode() == ProcTerminationCode.TIME_OUT) {
265  cleanup(outputDirPath, tempFilePath);
266  String msg = NbBundle.getMessage(this.getClass(), "PhotoRecIngestModule.processTerminated") + file.getName(); // NON-NLS
267  MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "PhotoRecIngestModule.moduleError"), msg); // NON-NLS
268  logger.log(Level.SEVERE, msg);
269  return IngestModule.ProcessResult.ERROR;
270  } else if (0 != exitValue) {
271  // if it failed or was cancelled by timeout, result is ERROR
272  cleanup(outputDirPath, tempFilePath);
273  totals.totalItemsWithErrors.incrementAndGet();
274  logger.log(Level.SEVERE, "PhotoRec carver returned error exit value = {0} when scanning {1}", // NON-NLS
275  new Object[]{exitValue, file.getName()}); // NON-NLS
276  MessageNotifyUtil.Notify.error(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.error.exitValue", // NON-NLS
277  new Object[]{exitValue, file.getName()}));
278  return IngestModule.ProcessResult.ERROR;
279  }
280 
281  // Move carver log file to avoid placement into Autopsy results. PhotoRec appends ".1" to the folder name.
282  java.io.File oldAuditFile = new java.io.File(Paths.get(outputDirPath.toString(), PHOTOREC_RESULTS_EXTENDED, PHOTOREC_REPORT).toString()); //NON-NLS
283  java.io.File newAuditFile = new java.io.File(Paths.get(outputDirPath.toString(), PHOTOREC_REPORT).toString()); //NON-NLS
284  oldAuditFile.renameTo(newAuditFile);
285 
286  if (this.context.fileIngestIsCancelled() == true) {
287  // if it was cancelled by the user, result is OK
288  logger.log(Level.INFO, "PhotoRec cancelled by user"); // NON-NLS
289  MessageNotifyUtil.Notify.info(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.cancelledByUser"));
290  return IngestModule.ProcessResult.OK;
291  }
292  Path pathToRemove = Paths.get(outputDirPath.toAbsolutePath().toString());
293  try (DirectoryStream<Path> stream = Files.newDirectoryStream(pathToRemove)) {
294  for (Path entry : stream) {
295  if (Files.isDirectory(entry)) {
296  FileUtil.deleteDir(new File(entry.toString()));
297  }
298  }
299  }
300  long writedelta = (System.currentTimeMillis() - writestart);
301  totals.totalWritetime.addAndGet(writedelta);
302 
303  // Now that we've cleaned up the folders and data files, parse the xml output file to add carved items into the database
304  long calcstart = System.currentTimeMillis();
305  PhotoRecCarverOutputParser parser = new PhotoRecCarverOutputParser(outputDirPath);
306  if (this.context.fileIngestIsCancelled() == true) {
307  // if it was cancelled by the user, result is OK
308  logger.log(Level.INFO, "PhotoRec cancelled by user"); // NON-NLS
309  MessageNotifyUtil.Notify.info(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.cancelledByUser"));
310  return IngestModule.ProcessResult.OK;
311  }
312  List<LayoutFile> carvedItems = parser.parse(newAuditFile, file, context);
313  long calcdelta = (System.currentTimeMillis() - calcstart);
314  totals.totalParsetime.addAndGet(calcdelta);
315  if (carvedItems != null && !carvedItems.isEmpty()) { // if there were any results from carving, add the unallocated carving event to the reports list.
316  totals.totalItemsRecovered.addAndGet(carvedItems.size());
317  context.addFilesToJob(new ArrayList<>(carvedItems));
318  services.fireModuleContentEvent(new ModuleContentEvent(carvedItems.get(0))); // fire an event to update the tree
319  }
320  } catch (ReadContentInputStreamException ex) {
321  totals.totalItemsWithErrors.incrementAndGet();
322  logger.log(Level.WARNING, String.format("Error reading file '%s' (id=%d) with the PhotoRec carver.", file.getName(), file.getId()), ex); // NON-NLS
323  MessageNotifyUtil.Notify.error(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.error.msg", file.getName()));
324  return IngestModule.ProcessResult.ERROR;
325  } catch (IOException ex) {
326  totals.totalItemsWithErrors.incrementAndGet();
327  logger.log(Level.SEVERE, String.format("Error writing file '%s' (id=%d) to '%s' with the PhotoRec carver.", file.getName(), file.getId(), tempFilePath), ex); // NON-NLS
328  MessageNotifyUtil.Notify.error(PhotoRecCarverIngestModuleFactory.getModuleName(), NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.error.msg", file.getName()));
329  return IngestModule.ProcessResult.ERROR;
330  } finally {
331  if (null != tempFilePath && Files.exists(tempFilePath)) {
332  // Get rid of the unallocated space file.
333  tempFilePath.toFile().delete();
334  }
335  }
336  return IngestModule.ProcessResult.OK;
337 
338  }
339 
340  private void cleanup(Path outputDirPath, Path tempFilePath) {
341  // cleanup the output path
342  FileUtil.deleteDir(new File(outputDirPath.toString()));
343  if (null != tempFilePath && Files.exists(tempFilePath)) {
344  tempFilePath.toFile().delete();
345  }
346  }
347 
348  private static synchronized void postSummary(long jobId) {
349  IngestJobTotals jobTotals = totalsForIngestJobs.remove(jobId);
350 
351  StringBuilder detailsSb = new StringBuilder();
352  //details
353  detailsSb.append("<table border='0' cellpadding='4' width='280'>"); //NON-NLS
354 
355  detailsSb.append("<tr><td>") //NON-NLS
356  .append(NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.complete.numberOfCarved"))
357  .append("</td>"); //NON-NLS
358  detailsSb.append("<td>").append(jobTotals.totalItemsRecovered.get()).append("</td></tr>"); //NON-NLS
359 
360  detailsSb.append("<tr><td>") //NON-NLS
361  .append(NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.complete.numberOfErrors"))
362  .append("</td>"); //NON-NLS
363  detailsSb.append("<td>").append(jobTotals.totalItemsWithErrors.get()).append("</td></tr>"); //NON-NLS
364 
365  detailsSb.append("<tr><td>") //NON-NLS
366  .append(NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.complete.totalWritetime"))
367  .append("</td><td>").append(jobTotals.totalWritetime.get()).append("</td></tr>\n"); //NON-NLS
368  detailsSb.append("<tr><td>") //NON-NLS
369  .append(NbBundle.getMessage(PhotoRecCarverFileIngestModule.class, "PhotoRecIngestModule.complete.totalParsetime"))
370  .append("</td><td>").append(jobTotals.totalParsetime.get()).append("</td></tr>\n"); //NON-NLS
371  detailsSb.append("</table>"); //NON-NLS
372 
373  IngestServices.getInstance().postMessage(IngestMessage.createMessage(
374  IngestMessage.MessageType.INFO,
375  PhotoRecCarverIngestModuleFactory.getModuleName(),
376  NbBundle.getMessage(PhotoRecCarverFileIngestModule.class,
377  "PhotoRecIngestModule.complete.photoRecResults"),
378  detailsSb.toString()));
379 
380  }
381 
385  @Override
386  public void shutDown() {
387  if (this.context != null && refCounter.decrementAndGet(this.jobId) == 0) {
388  try {
389  // The last instance of this module for an ingest job cleans out
390  // the working paths map entry for the job and deletes the temp dir.
391  WorkingPaths paths = PhotoRecCarverFileIngestModule.pathsByJob.remove(this.jobId);
392  FileUtil.deleteDir(new File(paths.getTempDirPath().toString()));
393  postSummary(jobId);
394  } catch (SecurityException ex) {
395  logger.log(Level.SEVERE, "Error shutting down PhotoRec carver module", ex); // NON-NLS
396  }
397  }
398  }
399 
400  private static final class WorkingPaths {
401 
402  private final Path outputDirPath;
403  private final Path tempDirPath;
404 
405  WorkingPaths(Path outputDirPath, Path tempDirPath) {
406  this.outputDirPath = outputDirPath;
407  this.tempDirPath = tempDirPath;
408  }
409 
410  Path getOutputDirPath() {
411  return this.outputDirPath;
412  }
413 
414  Path getTempDirPath() {
415  return this.tempDirPath;
416  }
417  }
418 
427  synchronized Path createModuleOutputDirectoryForCase() throws IngestModule.IngestModuleException {
428  Path path;
429  try {
430  path = Paths.get(Case.getCurrentCaseThrows().getModuleDirectory(), PhotoRecCarverIngestModuleFactory.getModuleName());
431  } catch (NoCurrentCaseException ex) {
432  throw new IngestModule.IngestModuleException(Bundle.cannotCreateOutputDir_message(ex.getLocalizedMessage()), ex);
433  }
434  try {
435  Files.createDirectory(path);
436  if (UNCPathUtilities.isUNC(path)) {
437  // if the UNC path is using an IP address, convert to hostname
438  path = uncPathUtilities.ipToHostName(path);
439  if (path == null) {
440  throw new IngestModule.IngestModuleException(Bundle.PhotoRecIngestModule_nonHostnameUNCPathUsed());
441  }
442  if (false == FileUtil.hasReadWriteAccess(path)) {
443  throw new IngestModule.IngestModuleException(
444  Bundle.PhotoRecIngestModule_PermissionsNotSufficient() + SEP + path.toString() + SEP
445  + Bundle.PhotoRecIngestModule_PermissionsNotSufficientSeeReference()
446  );
447  }
448  }
449  } catch (FileAlreadyExistsException ex) {
450  // No worries.
451  } catch (IOException | SecurityException | UnsupportedOperationException ex) {
452  throw new IngestModule.IngestModuleException(Bundle.cannotCreateOutputDir_message(ex.getLocalizedMessage()), ex);
453  }
454  return path;
455  }
456 
466  public static File locateExecutable() throws IngestModule.IngestModuleException {
467  File exeFile;
468  Path execName;
469  String photorec_linux_directory = "/usr/bin";
470  if (PlatformUtil.isWindowsOS()) {
471  execName = Paths.get(PHOTOREC_DIRECTORY, PHOTOREC_EXECUTABLE);
472  exeFile = InstalledFileLocator.getDefault().locate(execName.toString(), PhotoRecCarverFileIngestModule.class.getPackage().getName(), false);
473  } else {
474  File usrBin = new File("/usr/bin/photorec");
475  File usrLocalBin = new File("/usr/local/bin/photorec");
476  if (usrBin.canExecute() && usrBin.exists() && !usrBin.isDirectory()) {
477  photorec_linux_directory = "/usr/bin";
478  }else if(usrLocalBin.canExecute() && usrLocalBin.exists() && !usrLocalBin.isDirectory()){
479  photorec_linux_directory = "/usr/local/bin";
480  }else{
481  throw new IngestModule.IngestModuleException("Photorec not found");
482  }
483  execName = Paths.get(photorec_linux_directory, PHOTOREC_LINUX_EXECUTABLE);
484  exeFile = new File(execName.toString());
485  }
486 
487  if (null == exeFile) {
488  throw new IngestModule.IngestModuleException(Bundle.missingExecutable_message());
489  }
490 
491 
492  if (!exeFile.canExecute()) {
493  throw new IngestModule.IngestModuleException(Bundle.cannotRunExecutable_message());
494  }
495 
496  return exeFile;
497  }
498 
499 }
void fireModuleContentEvent(ModuleContentEvent moduleContentEvent)
synchronized static Logger getLogger(String name)
Definition: Logger.java:124
synchronized Path ipToHostName(Path inputPath)
static synchronized IngestServices getInstance()

Copyright © 2012-2018 Basis Technology. Generated on: Thu Oct 4 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.