...

Package location

Overview ▾

func DevfileFilenamesProvider

func DevfileFilenamesProvider(fsys filesystem.Filesystem, contextDir string) string

DevfileFilenamesProvider checks if the context dir contains devfile with possible names from possibleDevfileNames variable, else it returns "devfile.yaml" as default value.

func DevfileLocation

func DevfileLocation(fsys filesystem.Filesystem, contextDir string) string

DevfileLocation returns path to devfile File with approprite devfile File name from possibleDevfileNames variable, if contextDir value is provided as argument then DevfileLocation returns devfile path else it assumes current dir as contextDir and returns appropriate value.

func DirContainsOnlyDevfile

func DirContainsOnlyDevfile(fsys filesystem.Filesystem, path string) (bool, error)

DirContainsOnlyDevfile returns true if the directory contains only one file which is a devfile with a supported name

func DirIsEmpty

func DirIsEmpty(fsys filesystem.Filesystem, path string) (bool, error)

DirIsEmpty returns true if the given directory contains no file

func DirectoryContainsDevfile

func DirectoryContainsDevfile(fsys filesystem.Filesystem, dir string) (bool, error)

DirectoryContainsDevfile returns true if the given directory contains a devfile with a supported name

func IsDevfileName

func IsDevfileName(name string) bool

IsDevfileName returns true if name is a supported name for a devfile