[io.file.search]

io.file.search is a slot in the io namespace, in Hyperlambda, the language of Magic Cloud. Searches for files on the server.

  • Value (folder-path), required: Folder path to search from
  • Returns: Returns one child node per matching file, each containing [file] with the relative file path and [lines] with matching line numbers

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
[pattern] string yes Text or regular expression pattern to search for.
[regex] bool no Whether [pattern] should be interpreted as a regular expression. Default: false.
[case-sensitive] bool no Whether matching should be case-sensitive. Default: false.
[extensions] string no Optional comma-separated file extensions to include.

Returned nodes

Node Type Required Description
unnamed child node lambda no Search result object for one matching file. Can be repeated.
unnamed child node / [file] string yes Relative path to the matching file.
unnamed child node / [lines] lambda yes Line numbers containing matches in the file.
unnamed child node / [lines] / unnamed child node int no One matching line number. Can be repeated.

Guide

How to use io.file.search

JSON declaration

This is the complete declaration of io.file.search, as the running system describes it. It is also published as slot.json.

JSON declaration (loads when opened)

← io.file.save.binary all io.* slots io.file.unzip →