utils

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotADirectory = errors.New("path exists but it's not a directory")

Functions

func CreateDirectory

func CreateDirectory(fs vfs.FS, path string) error

func ReadFile

func ReadFile(fs vfs.FS, filePath string) ([]byte, error)

func RunCommand

func RunCommand(command string) error

RunCommand runs the input command through bash. This implies `/bin/bash` is installed on the host.

func WriteFile

func WriteFile(fs vfs.FS, file api.WriteFile) error

WriteFile writes the input file into the filesystem.

TODO: This is meant to be an implementation of the `write_files` cloud init instruction.

See: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#write-files

All the keys should be supported (for ex. owner, permissions, encoding, etc.)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL