Sfoglia il codice sorgente

ensure path exist moved here.

master
Patrick Peng Sun 8 anni fa
parent
commit
74d08b5805
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. +9
    -0
      fileinfo.go

+ 9
- 0
fileinfo.go Vedi File

import ( import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"log"
"os" "os"
"strings" "strings"


} }
return true return true
} }

func ensurePathExist(path string) {
d := filepath.Dir(path)
if !isFileExist(d) {
log.Println("Creating path [" + d + "]")
os.MkdirAll(d, 0700)
}
}

Loading…
Annulla
Salva