Liking cljdoc? Tell your friends :D
Clojure only.

utilities-clj.writer

Wraps writing of file content.

Wraps writing of file content.
raw docstring

csv-fileclj

(csv-file target-dir file-name data)

Writes data to a csv file. 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"]])

Writes data to a csv file.
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"]])
sourceraw docstring

txt-fileclj

(txt-file target-dir file-name lines)

Writes data to a text file. 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"])

Writes data to a text file.
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"])
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close