Mix.Generator.create_file

You're seeing just the function create_file, go back to Mix.Generator module for more information.
Link to this function

create_file(path, contents, opts \\ [])

View Source

Specs

create_file(Path.t(), iodata(), keyword()) :: boolean()

Creates a file with the given contents.

If the file already exists and the contents are not the same, it asks for user confirmation.

Options

  • :force - forces creation without a shell prompt
  • :quiet - does not log command output

Examples

iex> Mix.Generator.create_file(".gitignore", "_build\ndeps\n")
* creating .gitignore
true