   end
 
   @doc """
-  Returns the md5sum of a file. Only works for files. Folders passed will return :error:
+  Returns the md5sum of a file. Only works for files.
+  Folders passed will return :error:
 
   ## Arguments
 

  """
  @spec parent_path(bitstring) :: bitstring
  def parent_path(path) when is_bitstring(path) do
    Path.absname(path)
    |> String.split(Path.basename(path))
    |> List.first
  end

  @doc """
  Ensures that a directory/file is created. If is_file is set to true then file is created.

  ## Arguments

  - `path` - Path that is to be created

  - `is_file` - Boolean, indicating if path is a file, if true then ensure will create file. Default false (directory).
  
  ## Usage


      true ->
        case File.dir?(path) do
          true -> :error
          false -> path
                   |> File.read!
                   |> :ec_file.md5sum
                   |> to_string
        end
