Example #1
0
func CleanFileSystem() {
	isExist, err := ioutils.IsDirExists(Out)
	if err != nil {
		log.Error(err)
	}
	if isExist {
		os.RemoveAll(Out)
	}
}
Example #2
0
func RemoveBuildDir(buildName, buildNumber string) error {
	tempDirPath, err := GetBuildDir(buildName, buildNumber)
	if err != nil {
		return err
	}
	exists, err := ioutils.IsDirExists(tempDirPath)
	if err != nil {
		return err
	}
	if exists {
		return cliutils.CheckError(os.RemoveAll(tempDirPath))
	}
	return nil
}