utilities.writer

csv-file

(csv-file target-dir file-name data)
Writes data to a csv file.

Arguments: target-dir
           file-name
           data

If [target-dir] does not exists, it is created before saving.

File content in [data] should be represented as a sequence of sequences of strings.
The data is stored by rows.

File is saved to [target-dir]-[file-name].
Returns an absolute path to the [target-dir].

## Usage

   (require '[utilities.writer :refer :all])

   (csv-file "folder"
             "file.csv"
             [["header 1" "header 2"]
              ["row_1_col_1" "row_1_col_2"]
              ["row_2_col_1" "row_2_col_2"]])

txt-file

(txt-file target-dir file-name lines)
Writes data to a text file.

Arguments: target-dir
           file-name
           lines

If [target-dir] does not exists, it is created before saving.

File content in [lines] should be represented as a sequence of strings.

File is saved to [target-dir]-[file-name].
Returns an absolute path to the [target-dir].

## Usage

   (require '[utilities.writer :refer :all])

   (txt-file "folder"
             "file.asc"
             ["line 1"
              "line 2"
              "line 3"])