# Path: l2tscaffolder/lib/errors.py
# class Error(Exception):
# class EngineNotConfigured(Error):
# class FileHandlingError(Error):
# class NoValidDefinition(Error):
# class ScaffolderNotConfigured(Error):
# class UnableToConfigure(Error):
# class WrongCliInput(Error):


import os
import pathlib
import shutil
from l2tscaffolder.lib import errors
      file_path (str): path to the file.

    Returns:
      str: the path of the created file
    """
    _ = self.CreateFolderForFilePathIfNotExist(file_path)
    pathlib.Path(file_path).touch()
    return file_path

  def CopyFile(self, source: str, destination: str) -> str:
    """Copies a file.

    Args:
      source (str): path of the file to copy
      destination (str): path to copy the file to.

    Returns:
      str: the path of the copied file

    Raises:
      errors.FileHandlingError: when file copy operation fails.
    """
    _ = self.CreateFolderForFilePathIfNotExist(destination)
    try:
      shutil.copyfile(source, destination)
    except shutil.SameFileError as exception:
      raise errors.FileHandlingError((
          'Unable to copy file source and dest are the same files. '
          'Original error message: {0:s}').format(exception))
    except OSError as exception:

# Path: l2tscaffolder/lib/errors.py
# class Error(Exception):
# class EngineNotConfigured(Error):
# class FileHandlingError(Error):
# class NoValidDefinition(Error):
# class ScaffolderNotConfigured(Error):
# class UnableToConfigure(Error):
# class WrongCliInput(Error):


# Path: l2tscaffolder/lib/file_handler.py
import os
import pathlib
import shutil
from l2tscaffolder.lib import errors

      file_path (str): path to the file.

    Returns:
      str: the path of the created file
    """
    _ = self.CreateFolderForFilePathIfNotExist(file_path)
    pathlib.Path(file_path).touch()
    return file_path

  def CopyFile(self, source: str, destination: str) -> str:
    """Copies a file.

    Args:
      source (str): path of the file to copy
      destination (str): path to copy the file to.

    Returns:
      str: the path of the copied file

    Raises:
      errors.FileHandlingError: when file copy operation fails.
    """
    _ = self.CreateFolderForFilePathIfNotExist(destination)
    try:
      shutil.copyfile(source, destination)
    except shutil.SameFileError as exception:
      raise errors.FileHandlingError((
          'Unable to copy file source and dest are the same files. '
          'Original error message: {0:s}').format(exception))
    except OSError as exception:

      raise errors.FileHandlingError(