$$Include{docs/siteMacros.textCarver}

# Ingesting Files

Ingest functionality provides a convenient way to initialize a variable from the contents of a file. The file uses the same |. syntax as the rest of TextCarver:

$$example{}
\$\$IngestFile{person.md}
\$\$person.first{}

<br>

&#47;&#47;person.md contains:
|.first Alex
|.last Bobo

$$exampleRight{}
Alex

$$endExample{}

\$\$IngestFile{person | alex.md} initializes \$\$person from the contents of alex.md.

\$\$IngestDirectory{staffDirectory} loads each file in staffDirectory and initializes a variable with that name from the contents of the file.




[Next: The Code Stack](3cCodeStack.html)
