func (p *FileInf) makeDir(folder string) error {
	if er := chkFile(folder); !er {
		if err := os.Mkdir(folder, 0777); err != nil {
			return err
		}
	} else {
		if !p.OverWrite && !p.Skip {
			return fmt.Errorf("'%s' is existing. If you want to overwrite, please use an option '--overwrite'", folder)
		}
	}
	return nil
}
makeDir : Make a directory by checking duplication.
package utl
import (
	"encoding/json"
	"fmt"
	"os"
	"path/filepath"
	"reflect"
	"strconv"
	"strings"
)
type folderTree struct {
	IDs     [][]string `json:"id"`
	Names   []string   `json:"names"`
	Folders []string   `json:"folders"`
}
type aboutGet struct {
	User owners `json:"user"`
}
type forFT struct {
	Name   string   `json:"name"`
	ID     string   `json:"id"`
	Parent string   `json:"parent"`
	Tree   []string `json:"tree"`
}
type forFTTemp struct {
	Temp []forFT
}
type folderTr struct {
	Temp   [][]forFT
	Search string
}
type fileListDl struct {
	SearchedFolder       fileS         `json:"searchedFolder"`
	FolderTree           *folderTree   `json:"folderTree"`
	FileList             []fileListEle `json:"fileList"`
	TotalNumberOfFiles   int64         `json:"totalNumberOfFiles,omitempty"`
	TotalNumberOfFolders int64         `json:"totalNumberOfFolders,omitempty"`
}
type fileListEle struct {
	FolderTree []string `json:"folderTree"`
	Files      []fileS  `json:"files"`
}
func mime2ext(mime string) string {
	var obj map[string]interface{}
	json.Unmarshal([]byte(mimeVsEx), &obj)
	res, _ := obj[mime].(string)
	return res
}
func (p *FileInf) downloadFilesFromFolder(f fileS) error {
	temp := []string{p.Workdir, p.SaveName, p.FileName, p.FileSize, p.MimeType, p.WantExt}
	p.Workdir = f.Path
	ext := filepath.Ext(f.Name)
	if ext == "" {
		f.Name += func() string {
			if f.MimeType != "application/vnd.google-apps.script" {
				if f.OutMimeType == "" {
					return mime2ext(f.MimeType)
				}
				return mime2ext(f.OutMimeType)
			}
			return ""
		}()
	}
	p.SaveName = f.Name
	p.FileName = f.Name
	p.FileSize = f.Size
	p.MimeType = f.MimeType
	p.WantExt = func() string {
		if f.MimeType == "application/vnd.google-apps.script" {
			return ""
		}
		return p.WantExt
	}()
	p.Zip = true
	durl := func() string {
		if f.OutMimeType == "" {
			return driveapiurl + f.ID + "?alt=media"
		}
		if f.MimeType == "application/vnd.google-apps.script" {
			return appsscriptapi + "/" + f.ID + "/content"
		}
		return driveapiurl + f.ID + "/export?mimeType=" + f.OutMimeType
	}()
	p.writeFile(durl)
	p.Workdir, p.SaveName, p.FileName, p.FileSize, p.MimeType, p.WantExt = func(e []string) (string, string, string, string, string, string) {
		return e[0], e[1], e[2], e[3], e[4], e[5]
	}(temp)
	return nil
}
func (p *FileInf) makeFileByCondition(file fileS) error {
	if er := chkFile(filepath.Join(file.Path, file.Name)); er {
		if !p.OverWrite && !p.Skip {
			return fmt.Errorf("'%s' is existing in '%s'. If you want to overwrite, please use an option '--overwrite'", file.Name, file.Path)
		}
		if p.OverWrite && !p.Skip {
			return p.downloadFilesFromFolder(file)
		}
	} else {
		return p.downloadFilesFromFolder(file)
	}
	return nil
}