'Creates a file with the given content and encoding.
If the directory for the file does not exist, it is created, along
with missing intermediate directories.
See `Get File` for more information about possible ``encoding`` values,
including special values ``SYSTEM`` and ``CONSOLE``.
Examples:
| Create File | ${dir}/example.txt | Hello, world!      |         |
| Create File | ${path}            | Hyv\xe4 esimerkki | Latin-1 |
| Create File | /tmp/foo.txt       | ${content}         | SYSTEM  |
Use `Append To File` if you want to append to an existing file
and `Create Binary File` if you need to write bytes without encoding.
`File Should Not Exist` can be used to avoid overwriting existing
files.
The support for ``SYSTEM`` and ``CONSOLE`` encodings is new in Robot
Framework 3.0.'

def create_file(self, path, content='', encoding='UTF-8'):

    path = self._write_to_file(path, content, self._map_encoding(encoding))
    self._link("Created    file    '%s'.", path)
