# README
This package contains code from github.com/hashicorp/terraform/internal/lang/funcs that has been modified to use afero.Fs for filesystem access rather than using the OS packages directly.
# Functions
Basename takes a string containing a filesystem path and removes all except the last portion from it.
Dirname takes a string containing a filesystem path and removes the last portion from it.
File reads the contents of the file at the given path.
FileBase64 reads the contents of the file at the given path.
FileExists determines whether a file exists at the given path.
FileSet enumerates a set of files given a glob pattern
The underlying function implementation works relative to a particular base directory, so this wrapper takes a base directory string and uses it to construct the underlying function before calling it.
MakeAbsPathFunc constructs a function that converts a filesystem path to an absolute path.
MakeFileBase64Sha256Func constructs a function that is like Base64Sha256Func but reads the contents of a file rather than hashing a given literal string.
No description provided by the author
MakeFileExistsFunc constructs a function that takes a path and determines whether a file exists at that path.
MakeFileFunc constructs a function that takes a file path and returns the contents of that file, either directly as a string (where valid UTF-8 is required) or as a string containing base64 bytes.
MakeFileMd5Func constructs a function that is like Md5Func but reads the contents of a file rather than hashing a given literal string.
MakeFileSetFunc constructs a function that takes a glob pattern and enumerates a file set from that pattern.
MakeFileSha1Func constructs a function that is like Sha1Func but reads the contents of a file rather than hashing a given literal string.
MakeFileSha256Func constructs a function that is like Sha256Func but reads the contents of a file rather than hashing a given literal string.
MakeFileSha512Func constructs a function that is like Sha512Func but reads the contents of a file rather than hashing a given literal string.
PathExpandFunc constructs a function that expands a leading ~ character to the current user's home directory.
MakeTemplateFileFunc constructs a function that takes a file path and an arbitrary object of named values and attempts to render the referenced file as a template using HCL template syntax.
No description provided by the author
Pathexpand takes a string that might begin with a `~` segment, and if so it replaces that segment with the current user's home directory path.
# Variables
BasenameFunc constructs a function that takes a string containing a filesystem path and removes all except the last portion from it.
DirnameFunc constructs a function that takes a string containing a filesystem path and removes the last portion from it.