Skip to main content

File

File typed values are a filesystem file entry.

Files...

  • are mutable, i.e. making changes to a file results in the file being changed everywhere it's referenced
  • can be passed in/out of ops via file parameters
  • can be initialized via file initialization
  • are coerced according to file coercion

Initialization

File typed values can be constructed from a literal string or templated string; see string initialization.

Coercion

File typed values are coercible to:

  • boolean (files which are empty, all "0", or (case insensitive) "f" or "false" coerce to false; all else coerce to true)
  • array (if value of file is an array in JSON format)
  • number (if value of file is numeric)
  • object (if value of file is an object in JSON format)
  • string