NAME

Zuzu::Module::IO - std/io bindings for ZuzuScript.

DESCRIPTION

Implements the std/io module, exporting path and stream helpers.

EXPORTS

Path

Filesystem path object backed by Path::Tiny. Supports path manipulation, metadata checks, file I/O, and traversal helpers.

Notable methods include:

  • path transforms: absolute, child, parent, sibling

  • queries: exists, is_file, is_dir, subsumes

  • binary I/O: slurp, spew, append, lines

  • UTF-8 I/O: slurp_utf8, spew_utf8, append_utf8, lines_utf8

  • streaming: each_line, next_line

  • traversal: children, iterator, visit

  • metadata: size, size_human, stat, lstat

  • directories: mkdir, mkdir_exclusive, remove_tree

Static helpers include cwd, rootdir, tempfile, and tempdir.

PathIterator

Iterator object returned by Path->iterator.

Methods:

  • next()

STDIN

Methods:

  • next_line(raw?)

  • each_line(callback, raw?)

STDOUT and STDERR

Methods:

  • print(...)

  • say(...)

COPYRIGHT AND LICENCE

Zuzu::Module::IO is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.