add FilePath
This commit is contained in:
parent
8df03c455c
commit
21e9525e76
@ -68,6 +68,10 @@ func (t *Path) CreateFile(name string, content string) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *Path) FilePath(name string) string {
|
||||||
|
return filepath.Join(string(*t), name)
|
||||||
|
}
|
||||||
|
|
||||||
func (t *Path) Mkdir(name string, mode os.FileMode) (err error) {
|
func (t *Path) Mkdir(name string, mode os.FileMode) (err error) {
|
||||||
var path string
|
var path string
|
||||||
if path, err = filepath.Abs(filepath.Join(string(*t), name)); err == nil {
|
if path, err = filepath.Abs(filepath.Join(string(*t), name)); err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user