incredible-go-core/pkg/io/files/file_open_helper.go

16 lines
206 B
Go

package files
import (
"os"
)
func OpenFileForWriting(fileLocation string) (*os.File, error) {
err := MkdirParent(fileLocation)
if err != nil {
return nil, err
}
return os.Create(fileLocation)
}