Example #1
0
func OpenFile(name string, needLink bool, linkDirectory string) (file *os.File, err error) {
	linkFileName := name
	if needLink {
		linkFileName, err = createLink(name, linkDirectory)
		if err != nil {
			return nil, err
		}
	}
	file, err = winfile.OpenFile(linkFileName, os.O_RDONLY, 0)
	return file, err
}
Example #2
0
func OpenFile(name string) (file *os.File, err error) {
	return winfile.OpenFile(name, os.O_RDONLY, 0)
}