func OpenFile(name string, flag int, perm os.FileMode) (*File, error) {
	f, err := os.OpenFile(name, flag, perm)
	if err != nil {
		return nil, errs.FileError(err, name)
	}
	return &File{
		File: f,
	}, nil
}
OpenFile calls os.OpenFile method and returns the os.File wrapped.
package utils
import (
	"os"
	"github.com/smallstep/cli/errs"
)
type File struct {
	File *os.File
	err  error
}