WardrikWorkspace.Reads (wardrik_workspace v0.1.0-rc.1)

Copy Markdown

The read-only file tools: read_file, list_files and search_files.

Each answer carries the labels of the files it shows, so the run that reads them carries them.

Summary

Functions

Lists the files a glob matches, newest first, with each one's size, writer and time.

Reads a file's lines, numbered from 1, with its version.

Finds the lines a regular expression matches, with the lines around them where asked.

Functions

list_files(spec, args)

@spec list_files(WardrikWorkspace.Spec.t(), map()) :: {:ok, map()}

Lists the files a glob matches, newest first, with each one's size, writer and time.

read_file(spec, args)

@spec read_file(WardrikWorkspace.Spec.t(), map()) :: {:ok, map()}

Reads a file's lines, numbered from 1, with its version.

search_files(spec, args)

@spec search_files(WardrikWorkspace.Spec.t(), map()) :: {:ok, map()}

Finds the lines a regular expression matches, with the lines around them where asked.