Browse Source

添加GetCurrentPath方法的注释

pull/16/head
zhangxin 4 years ago
parent
commit
e140e725ab
1 changed files with 18 additions and 1 deletions
  1. +18
    -1
      utils/file.go

+ 18
- 1
utils/file.go View File

@ -99,7 +99,24 @@ func IsExists(path string) bool {
} }
//windows环境下获取绝对路径
/******************************************************************************
*
* @Function Name : GetCurrentPath
*-----------------------------------------------------------------------------
*
* @Description : windows下获取传入相对路径的绝对路径
*
* @Function Parameters : dir 相对路径
*
* @Return Value : string 绝对路径
*
* @Return Value : error 执行出现的错误
*
* @Author : zhangxin
*
* @Date : 2021-03-19
*
******************************************************************************/
func GetCurrentPath(dir string) (string, error) { func GetCurrentPath(dir string) (string, error) {
file, err := exec.LookPath(os.Args[0]) file, err := exec.LookPath(os.Args[0])
if err != nil { if err != nil {


Loading…
Cancel
Save