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

16 lines
206 B
Go
Raw Normal View History

2024-06-20 14:06:24 +02:00
package files
import (
"os"
)
func OpenFileForWriting(fileLocation string) (*os.File, error) {
err := MkdirParent(fileLocation)
if err != nil {
return nil, err
}
return os.Create(fileLocation)
}