import ("os""path/filepath""time") // CreateDateDir 根据当前日期来创建文件夹 func CreateDateDir(Path string) string { folderName := time.Now().Format("20060102") folderPath := filepath.Join(Path, folderName)if_, err := os.Stat(folderPath); os.IsNotExist(err) {//必须分成两步:先...
CREATE TABLE IF NOT EXISTS secret_key( uid INTEGER PRIMARY KEY AUTOINCREMENT, fileName256 VARCHAR NULL, fileName VARCHAR NULL, content VARCHAR NULL, password VARCHAR NULL ); ` db.Exec(sqlTable) fileDir := "." //需要加密的相对路径 var selectMenus string //选择菜单 var extlist []string /...
func CreateDateDir(Path string) string { folderName := time.Now().Format("20060102") folderPath := filepath.Join(Path, folderName) if _, err := os.Stat(folderPath); os.IsNotExist(err) { // 必须分成两步:先创建文件夹、再修改权限 os.Mkdir(folderPath, 0777) //0777也可以os.ModePerm...
1、调用ctx.ShouldBind函数 2、ShouldBind函数根据请求的方法(POST还是GET)以及Content-Type获取具体的bind...
("folder exists") return err } if FolderExists == nil { err := os.MkdirAll(p, os.ModePerm) if err != nil { return err } } return nil } func FileExists(filename string) bool { info, err := os.Stat(filename) if os.IsNotExist(err) { return false } if info == nil { ...
Close(); err2 != nil && err == nil { err = err2 } }() // 开始压缩 if sourceInfo.IsDir() { return tp.tarFolder(sourceFullPath, filepath.Base(sourceFullPath), tarWriter) } return tp.tarFile(sourceFullPath, tarWriter) } 单文件打包 单个文件的打包比较简单,直接读取源文件,写入tar...
B. Install the sqlite3 in the system if it has not been installed before. Sqlite3 is installed by default on Ubuntu 20+. Run the following command to check the installed version of sqlite3:$ sqlite3 --versionC. Run the following commands to create a folder named “golang-sqlite” and...
imagePageHtmlContent := getHtmlFromUrl(imagePageUrl)// redis中不存在,说明这张图片没被爬取过exists := hexists("kongjie", uid+":"+picId)if !exists { // 获取图片src,即图片具体链接 imageSrcList := imageUrlPattern.FindSubmatch(imagePageHtmlContent) if len(imageSrcList) > 0 { imageSrc :...
The JSON-RPC server exists to ease the migration of wallet applications from Core, but complete compatibility is not guaranteed. Some portions of the API (and especially accounts) have to work differently due to other design decisions (mostly due to BIP0044). However, if you find a compatibili...
// CreateDateDir 根据当前⽇期来创建⽂件夹 func CreateDateDir(Path string) string { folderName := time.Now().Format("20060102")folderPath := filepath.Join(Path, folderName)if _, err := os.Stat(folderPath); os.IsNotExist(err) { // 必须分成两步:先创建⽂件夹、再修改权限 os....