Test whether a path refers to an existing regular file.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_validate_file_exists

Purpose

Test whether a path refers to an existing regular file.

Arguments

  • $1 — Path to test.

Returns

  • 0 for an existing regular file; 1 otherwise.

Usage

  sgnd_validate_file_exists "/etc/hosts"