# Functions
CalcFileChecksum opens the given file and returns the sha256 checksum of it.
ConcatFiles Copies source files to target file using Fs interface.
CopyFile Copies source file to target file using Fs interface.
Copies source file to target file using Fs interface.
CreateSquashFS creates a squash file at destination from a source, with options TODO: Check validity of source maybe?.
CreateTar a imagetarball from a standard tarball.
DirSize returns the accumulated size of all files in folder.
Check if a file or directory exists.
GetUkiCmdline returns the cmdline to be used for the kernel.
GetUkiSingleCmdlines returns the single-efi-cmdline as passed by the user.
No description provided by the author
No description provided by the author
No description provided by the author
IsDir check if the path is a dir.
MkdirAll directory and all parents if not existing.
NameFromCmdline returns the name of the efi/conf file based on the cmdline we want to have at least 1 efi file that its the default, that is the one we ship with the iso/media/whatever install medium that one has the default cmdline + the install cmdline For that one, we use it as the BASE one, configs will only trigger for that install stanza if we are on install media so we dont have to worry about it, but we want to provide a clean name for it so in that case we dont add anything to the efi name/conf name/cmdline inside the config For the other ones, we add the cmdline to the efi name and the cmdline to the conf file so you get - norole.efi - norole.conf - norole_interactive-install.efi - norole_interactive-install.conf This is mostly for convenience in generating the names as the real data is stored in the config file but it can easily be used to identify the efi file and the conf file.
Tar takes a source and variable writers and walks 'source' writing each file found to the tar writer; the purpose for accepting multiple writers is to allow for multiple outputs (for example a file, or md5 hash).
TempDir creates a temp file in the virtual fs Took from afero.FS code and adapted.