BUCL.io / writefile
Schreibt bzw. überschreibt den Inhalt einer Datei.
Beispiel
{res} writefile "test.txt" "Sample content"
Quellcode
#writefile
#description: Writes/overwrites content to a file
#description-DE: Schreibt bzw. überschreibt den Inhalt einer Datei.
#sample: {res} writefile "test.txt" "Sample content"
#to test direct: {input} = "test.txt" "Sample content" "more" /tatsi katzi
{fileName} = {input/0}
{loop} each {input}
if {loop/key} !== 0
{restOfInput/{loop/key}} = {loop/value}
{r} = {restOfInput}
{output} fetch "file://{input/0}" /method "POST" /body {restOfInput}