# Path: auto_forensicate/recipes/directory.py
# def FullPathToName(path):
#   def __init__(self, path, method='tar', compress=False):
#   def _GetSize(self):
#   def _GetStream(self):
#   def CloseStream(self):
#   def _GenerateCopyCommand(self):
#   def _GenerateTarCopyCommand(self):
#   def __init__(self, path, method='tar', compress=False):
#   def __init__(self, path, method='tar', compress=False):
#   def GetArtifacts(self):
# class DirectoryArtifact(base.BaseArtifact):
# class LinuxDirectoryArtifact(DirectoryArtifact):
# class MacDirectoryArtifact(DirectoryArtifact):
# class DirectoryRecipe(base.BaseRecipe):
#   _SUPPORTED_METHODS = ['tar']
#   _TAR_COMMAND = [
#       'tar', '-c', '-p', '--xattrs', '--acls', '--format=posix', '-f', '-']


import os
import subprocess
import tempfile
import unittest
from auto_forensicate.recipes import directory
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the disk.py module."""

from __future__ import unicode_literals


# pylint: disable=missing-docstring
# pylint: disable=protected-access


class DirectoryArtifactTests(unittest.TestCase):
  """Tests for the DirectoryArtifact class."""

  def _EmptyFolderSize(self):
    """Returns the size of an empty folder.

    This should match the current filesystem blocksize.
    """
    size = int(subprocess.check_output(['stat', '-fc', '%s', '.']).strip())
    return size

  def testInstantiate(self):
    with tempfile.TemporaryDirectory() as path:
      expected_name = path.replace(os.path.sep, '_')

# Path: auto_forensicate/recipes/directory.py
# def FullPathToName(path):
#   def __init__(self, path, method='tar', compress=False):
#   def _GetSize(self):
#   def _GetStream(self):
#   def CloseStream(self):
#   def _GenerateCopyCommand(self):
#   def _GenerateTarCopyCommand(self):
#   def __init__(self, path, method='tar', compress=False):
#   def __init__(self, path, method='tar', compress=False):
#   def GetArtifacts(self):
# class DirectoryArtifact(base.BaseArtifact):
# class LinuxDirectoryArtifact(DirectoryArtifact):
# class MacDirectoryArtifact(DirectoryArtifact):
# class DirectoryRecipe(base.BaseRecipe):
#   _SUPPORTED_METHODS = ['tar']
#   _TAR_COMMAND = [
#       'tar', '-c', '-p', '--xattrs', '--acls', '--format=posix', '-f', '-']


# Path: tests/directory_tests.py
import os
import subprocess
import tempfile
import unittest
from auto_forensicate.recipes import directory

#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the disk.py module."""

from __future__ import unicode_literals


# pylint: disable=missing-docstring
# pylint: disable=protected-access


class DirectoryArtifactTests(unittest.TestCase):
  """Tests for the DirectoryArtifact class."""

  def _EmptyFolderSize(self):
    """Returns the size of an empty folder.

    This should match the current filesystem blocksize.
    """
    size = int(subprocess.check_output(['stat', '-fc', '%s', '.']).strip())
    return size

  def testInstantiate(self):
    with tempfile.TemporaryDirectory() as path:
      expected_name = path.replace(os.path.sep, '_')

      d = directory.DirectoryArtifact(path, method='tar', compress=False)