   end
 
   defp do_mkdir(path) do
-    if !File.exists?(path) do
+    unless File.exists?(path) do
       case File.mkdir(path) do
         :ok -> path
         error -> error


  @spec ensure(bitstring, bitstring) :: none
  def ensure(path, is_file \\ false) when is_bitstring(path) do
    if !File.exists?(path) do
      cond do
        is_file == false -> File.mkdir_p(path)
        is_file -> File.touch(path)


  @spec parent_path(list) :: none
  def zip(dirs, archive_name) when is_list(dirs) do
    dirs_list = dirs
    |> Enum.filter(fn(x) -> File.exists?(x) end)
    |> Enum.map&(String.to_char_list(&1))
    unless Enum.empty? dirs_list do
      Z.create(String.to_char_list(archive_name), dirs_list)
    end
  end
