View Source Moar.File (Moar v1.4.0)

File-related functions.

Link to this section Summary

Functions

Returns a path to a new temp file in a new temp directory.

Writes contents to a new temp file with extension file_extension, and returns the path to the file.

Link to this section Functions

Link to this function

new_tempfile_path(file_extension)

View Source
@spec new_tempfile_path(file_extension :: binary()) :: binary()

Returns a path to a new temp file in a new temp directory.

Link to this function

write_tempfile(contents, file_extension)

View Source
@spec write_tempfile(contents :: iodata(), file_extension :: binary()) :: binary()

Writes contents to a new temp file with extension file_extension, and returns the path to the file.