Documentation ¶
Overview ¶
Package ffs contains functions that manipulate file system
Index ¶
- func CheckIfFileExists(fileName string) bool
- func CreateBuildContext(dockerfile string) string
- func CreateComposeYmlContext(composeYmlContent string) (string, string)
- func CreateFilePathInHome(dirPath string) string
- func CreateNestedDir(dirPath string) string
- func CreateTarFilePath() string
- func CreateTempDir(directoryPrefix string) string
- func CreateTempFile(filename string, content string) string
- func DeleteDirectory(directoryPath string)
- func WriteFile(name string, data string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfFileExists ¶ added in v0.4.0
CheckIfFileExists checks if a file exists in the filesystem.
func CreateBuildContext ¶
CreateBuildContext creates a directory which contains a Dockerfile with the specified content and returns the path to the directory. It is the caller's responsibility to remove the directory when it is no longer needed.
func CreateComposeYmlContext ¶
CreateComposeYmlContext creates a temp directory along with a docker-compose.yml file. It is the caller's responsibility to remove the directory when it is no longer needed.
func CreateFilePathInHome ¶ added in v0.7.7
CreateFilePathInHome creates a filepath and returns the path.
func CreateNestedDir ¶ added in v0.7.0
CreateNestedDir creates a nested directory and returns the path of the created directory. It is the caller's responsibility to remove the directory when it is no longer needed.
func CreateTarFilePath ¶
func CreateTarFilePath() string
CreateTarFilePath creates a directory and a tar file path appended to the directory and returns the tar file path. It is the caller's responsibility to remove the directory when it is no longer needed. TODO: replace with CreateTempDir.
func CreateTempDir ¶
CreateTempDir creates a temp directory and returns the path of the created directory. It is the caller's responsibility to remove the directory when it is no longer needed.
func CreateTempFile ¶
CreateTempFile creates a temp directory which contains a temp file and returns the path to the temp file. It is the caller's responsibility to remove the directory when it is no longer needed.
func DeleteDirectory ¶ added in v0.7.0
func DeleteDirectory(directoryPath string)
DeleteDirectory deletes the directory including nested directories.
Types ¶
This section is empty.