2022-08-27 08:49:24 -04:00
|
|
|
//go:build !windows
|
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package sequential
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
2024-07-25 08:56:13 -04:00
|
|
|
// Create is an alias for [os.Create] on non-Windows platforms.
|
2022-08-27 08:49:24 -04:00
|
|
|
func Create(name string) (*os.File, error) {
|
|
|
|
return os.Create(name)
|
|
|
|
}
|
|
|
|
|
2024-07-25 08:56:13 -04:00
|
|
|
// Open is an alias for [os.Open] on non-Windows platforms.
|
2022-08-27 08:49:24 -04:00
|
|
|
func Open(name string) (*os.File, error) {
|
|
|
|
return os.Open(name)
|
|
|
|
}
|
|
|
|
|
2024-07-25 08:56:13 -04:00
|
|
|
// OpenFile is an alias for [os.OpenFile] on non-Windows platforms.
|
2022-08-27 08:49:24 -04:00
|
|
|
func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
|
|
|
|
return os.OpenFile(name, flag, perm)
|
|
|
|
}
|
|
|
|
|
2024-07-25 08:56:13 -04:00
|
|
|
// CreateTemp is an alias for [os.CreateTemp] on non-Windows platforms.
|
2022-08-27 08:49:24 -04:00
|
|
|
func CreateTemp(dir, prefix string) (f *os.File, err error) {
|
|
|
|
return os.CreateTemp(dir, prefix)
|
|
|
|
}
|