func DeleteConfigurationsDirectory() error {
	return os.RemoveAll(GetAppInfo().ConfigurationsDir)
}
DeleteConfigurationsDirectory delete the configurations directory
package aid
import (
	"bufio"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"runtime"
	"strconv"
	"strings"
	"github.com/awslabs/clencli/helper"
	"github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
	"github.com/spf13/viper"
	"gopkg.in/yaml.v2"
)
func ConfigurationsDirectoryExist() bool {
	return helper.DirOrFileExists(GetAppInfo().ConfigurationsDir)
}
func ConfigurationsFileExist() bool {
	return helper.DirOrFileExists(GetAppInfo().ConfigurationsPath)
}
func CreateConfigurationsDirectory() (bool, string) {
	dir := GetAppInfo().ConfigurationsDir
	return helper.MkDirsIfNotExist(dir), dir
}
func CredentialsFileExist() bool {
	return helper.DirOrFileExists(GetAppInfo().CredentialsPath)
}
func ReadConfig(name string) (*viper.Viper, error) {
	v := viper.New()
	app := GetAppInfo()
	v.SetConfigName(name)
	v.SetConfigType("yaml")
	v.AddConfigPath(app.ConfigurationsDir)
	err := v.ReadInConfig()
	if err != nil {
		return v, fmt.Errorf("unable to read configuration:%s\n%v", name, err)
	}
	return v, err
}
func ReadConfigAsViper(configPath string, configName string, configType string) (*viper.Viper, error) {
	v := viper.New()
	v.AddConfigPath(configPath)
	v.SetConfigName(configName)
	v.SetConfigType(configType)
	err := v.ReadInConfig()
	if err != nil {
		return v, fmt.Errorf("unable to read configuration as viper\n%v", err)
	}
	return v, err
}
func ReadTemplate(fileName string) (*viper.Viper, error) {
	c := viper.New()
	c.AddConfigPath("clencli")
	c.SetConfigName(fileName)
	c.SetConfigType("yaml")
	c.SetConfigPermissions(os.ModePerm)
	err := c.ReadInConfig()  
	if err != nil {          
		return c, fmt.Errorf("Unable to read "+fileName+" via Viper"+"\n%v", err)
	}
	return c, nil
}
func WriteInterfaceToFile(in interface{}, path string) error {
	b, err := yaml.Marshal(&in)
	if err != nil {
		_, ok := err.(*json.UnsupportedTypeError)
		if ok {
			return fmt.Errorf("json unsupported type error")
		}
	}
	err = ioutil.WriteFile(path, b, os.ModePerm)
	if err != nil {
		return fmt.Errorf("unable to update:%s\n%v", path, err)
	}
	return err
}
func DeleteCredentialFile() error {
	return helper.DeleteFile(GetAppInfo().CredentialsPath)
}
func DeleteConfigurationFile() error {
	return helper.DeleteFile(GetAppInfo().ConfigurationsPath)
}