file-write-read

command
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

File Write Read

A noderun workflow that writes a file and reads it back in one flow:

inject "Hello file!" → file (write) → fileIn (read) → debug

The write goes to a file in the OS temp directory, which the example cleans up afterwards.

Things to notice:

  • The file node writes msg.payload to its configured filename and forwards the message with msg.filename set — so a downstream fileIn node with filenameType: "msg" needs no path of its own; it just reads whatever the writer wrote. filenameType also accepts "flow"/"global" to read the path from a context scope.
  • createDir: true makes the writer create missing parent directories (mkdir -p semantics). appendNewline adds a trailing newline on each write when set.
  • The reader's format option selects how file contents land in msg.payload (text by default).

Run from the noderun module root:

go run ./examples/file-write-read

Expected output:

Hello file!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL