summaryrefslogtreecommitdiff
path: root/vendor/github.com/moby/sys/sequential/sequential_unix.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-15 09:11:16 -0600
committermo khan <mo@mokhan.ca>2025-05-15 09:11:16 -0600
commit3d01a69471fc4f0ae9f2f4145620b6aea50f2216 (patch)
treef85607ebfb2575bce94b5618250ebd957f965f6e /vendor/github.com/moby/sys/sequential/sequential_unix.go
parent7c75fac3360b8bc3df630b5f8e12b2ff927a2d23 (diff)
parent564e140de454c78d7e6d34044bb78f53bd0b2bf3 (diff)
Merge branch 'envoy-start' into 'main'
Enable Envoy to run consistently locally and in Docker See merge request gitlab-org/software-supply-chain-security/authorization/sparkled!6
Diffstat (limited to 'vendor/github.com/moby/sys/sequential/sequential_unix.go')
-rw-r--r--vendor/github.com/moby/sys/sequential/sequential_unix.go27
1 files changed, 4 insertions, 23 deletions
diff --git a/vendor/github.com/moby/sys/sequential/sequential_unix.go b/vendor/github.com/moby/sys/sequential/sequential_unix.go
index a3c7340..278cdfb 100644
--- a/vendor/github.com/moby/sys/sequential/sequential_unix.go
+++ b/vendor/github.com/moby/sys/sequential/sequential_unix.go
@@ -5,41 +5,22 @@ package sequential
import "os"
-// Create creates the named file with mode 0666 (before umask), truncating
-// it if it already exists. If successful, methods on the returned
-// File can be used for I/O; the associated file descriptor has mode
-// O_RDWR.
-// If there is an error, it will be of type *PathError.
+// Create is an alias for [os.Create] on non-Windows platforms.
func Create(name string) (*os.File, error) {
return os.Create(name)
}
-// Open opens the named file for reading. If successful, methods on
-// the returned file can be used for reading; the associated file
-// descriptor has mode O_RDONLY.
-// If there is an error, it will be of type *PathError.
+// Open is an alias for [os.Open] on non-Windows platforms.
func Open(name string) (*os.File, error) {
return os.Open(name)
}
-// OpenFile is the generalized open call; most users will use Open
-// or Create instead. It opens the named file with specified flag
-// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
-// methods on the returned File can be used for I/O.
-// If there is an error, it will be of type *PathError.
+// OpenFile is an alias for [os.OpenFile] on non-Windows platforms.
func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {
return os.OpenFile(name, flag, perm)
}
-// CreateTemp creates a new temporary file in the directory dir
-// with a name beginning with prefix, opens the file for reading
-// and writing, and returns the resulting *os.File.
-// If dir is the empty string, TempFile uses the default directory
-// for temporary files (see os.TempDir).
-// Multiple programs calling TempFile simultaneously
-// will not choose the same file. The caller can use f.Name()
-// to find the pathname of the file. It is the caller's responsibility
-// to remove the file when no longer needed.
+// CreateTemp is an alias for [os.CreateTemp] on non-Windows platforms.
func CreateTemp(dir, prefix string) (f *os.File, err error) {
return os.CreateTemp(dir, prefix)
}