 
   You can use `:file.format_error/1` to get a descriptive string of the error.
   """
-  @spec read(Path.t) :: {:ok, binary} | {:error, posix}
+  @spec read(Path.t()) :: {:ok, binary} | {:error, posix}
   def read(path) do
     :file.read_file(IO.chardata_to_string(path))
   end

  @doc """
  Same as `rmdir/1`, but raises an exception in case of failure. Otherwise `:ok`.
  """
  @spec rmdir!(Path.t) :: :ok | {:error, posix}
  def rmdir!(path) do
    case rmdir(path) do
      :ok -> :ok
      {:error, reason} ->
        raise File.Error, reason: reason, action: "remove directory",
          path: IO.chardata_to_string(path)
    end
  end

  Same as `rm_rf/1` but raises `File.Error` in case of failures,
  otherwise the list of files or directories removed.
  """
  @spec rm_rf!(Path.t()) :: [binary] | no_return
  def rm_rf!(path) do
    case rm_rf(path) do
      {:ok, files} ->
        files

      {:error, reason, _} ->
        raise File.Error,
          reason: reason,
          path: IO.chardata_to_string(path),
          action: "remove files and directories recursively from"
    end
  end
