# Path: auto_forensicate/errors.py
# class BadConfigOption(Exception):
# class ForensicateError(Exception):
# class RecipeException(Exception):
# class RetryableError(ForensicateError):
# 
# Path: auto_forensicate/recipes/base.py
# class BaseArtifact(object):
# class StringArtifact(BaseArtifact):
# class FileArtifact(BaseArtifact):
# class ProcessOutputArtifact(BaseArtifact):
# class BaseRecipe(object):
#   def __init__(self, name):
#   def _GetStream(self):
#   def CloseStream(self):
#   def OpenStream(self):
#   def size(self):
#   def readable_size(self):
#   def __init__(self, path, string_content):
#   def _GetStream(self):
#   def CloseStream(self):
#   def __init__(self, path):
#   def _GetStream(self):
#   def __init__(self, command, path, ignore_failure=False):
#   def _RunCommand(self):
#   def _GetStream(self):
#   def __init__(self, name, options=None):
#   def __enter__(self):
#   def __exit__(self, exc_type, exc_value, traceback):
#   def GetArtifacts(self):
# 
# Path: auto_forensicate/ux/cli.py
# def AskText(message, mandatory=False):
# def AskDiskList(disk_list):
# def Confirm(text, default='N'):
# 
# Path: auto_forensicate/ux/gui.py
# def AskText(message, mandatory=False):
# def AskDiskList(disk_list):
# def Confirm(text):


import os
import subprocess
from auto_forensicate import errors
from auto_forensicate.recipes import base
from auto_forensicate.ux import cli
from auto_forensicate.ux import gui
    Returns:
      list: the argument list for the dd command
    """
    if self._method == 'tar':
      return self._GenerateTarCopyCommand()
    else:
      raise errors.RecipeException('Unsupported method '+self._method)

  def _GenerateTarCopyCommand(self):
    """Creates the full command to execute for the copy.

    Returns:
      list(str): the command to run.
    """

    command = self._TAR_COMMAND
    if self._compress:
      command.append('-z')

    command.append(self.path)

    return command


class LinuxDirectoryArtifact(DirectoryArtifact):
  """The LinuxDirectoryArtifact class."""

  def __init__(self, path, method='tar', compress=False):
    """Initializes a LinuxDirectoryArtifact object."""
    if method not in self._SUPPORTED_METHODS:

# Path: auto_forensicate/errors.py
# class BadConfigOption(Exception):
# class ForensicateError(Exception):
# class RecipeException(Exception):
# class RetryableError(ForensicateError):
# 
# Path: auto_forensicate/recipes/base.py
# class BaseArtifact(object):
# class StringArtifact(BaseArtifact):
# class FileArtifact(BaseArtifact):
# class ProcessOutputArtifact(BaseArtifact):
# class BaseRecipe(object):
#   def __init__(self, name):
#   def _GetStream(self):
#   def CloseStream(self):
#   def OpenStream(self):
#   def size(self):
#   def readable_size(self):
#   def __init__(self, path, string_content):
#   def _GetStream(self):
#   def CloseStream(self):
#   def __init__(self, path):
#   def _GetStream(self):
#   def __init__(self, command, path, ignore_failure=False):
#   def _RunCommand(self):
#   def _GetStream(self):
#   def __init__(self, name, options=None):
#   def __enter__(self):
#   def __exit__(self, exc_type, exc_value, traceback):
#   def GetArtifacts(self):
# 
# Path: auto_forensicate/ux/cli.py
# def AskText(message, mandatory=False):
# def AskDiskList(disk_list):
# def Confirm(text, default='N'):
# 
# Path: auto_forensicate/ux/gui.py
# def AskText(message, mandatory=False):
# def AskDiskList(disk_list):
# def Confirm(text):


# Path: auto_forensicate/recipes/directory.py
import os
import subprocess
from auto_forensicate import errors
from auto_forensicate.recipes import base
from auto_forensicate.ux import cli
from auto_forensicate.ux import gui

    Returns:
      list: the argument list for the dd command
    """
    if self._method == 'tar':
      return self._GenerateTarCopyCommand()
    else:
      raise errors.RecipeException('Unsupported method '+self._method)

  def _GenerateTarCopyCommand(self):
    """Creates the full command to execute for the copy.

    Returns:
      list(str): the command to run.
    """

    command = self._TAR_COMMAND
    if self._compress:
      command.append('-z')

    command.append(self.path)

    return command


class LinuxDirectoryArtifact(DirectoryArtifact):
  """The LinuxDirectoryArtifact class."""

  def __init__(self, path, method='tar', compress=False):
    """Initializes a LinuxDirectoryArtifact object."""
    if method not in self._SUPPORTED_METHODS:

      raise errors.RecipeException(