Help us shape the future of Go! Take the 2026 Go Developer Survey

golang

package
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	O_RDONLY = os.O_RDONLY // open the file read-only.
	O_WRONLY = os.O_WRONLY // open the file write-only.
	O_RDWR   = os.O_RDWR   // open the file read-write.
	// The remaining values may be or'ed in to control behavior.
	O_APPEND = os.O_APPEND // append data to the file when writing.
	O_CREATE = os.O_CREATE // create a new file if none exists.
	O_EXCL   = os.O_EXCL   // used with O_CREATE, file must not exist.
	O_SYNC   = os.O_SYNC   // open for synchronous I/O.
	O_TRUNC  = os.O_TRUNC  // truncate regular writable file when opened.

	// O_FILE_FLAG_NO_RO_ATTR skips setting a file's read-only attribute on Windows.
	// We set this data empirically, based on the values listed at
	// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea and
	// https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
	O_FILE_FLAG_NO_RO_ATTR = 0x00010000
)

Variables

View Source
var (
	Chmod           = os.Chmod
	ErrExist        = os.ErrExist
	IsExist         = os.IsExist
	IsNotExist      = os.IsNotExist
	IsPathSeparator = os.IsPathSeparator
	IsPermission    = os.IsPermission
	Lstat           = os.Lstat
	ModeSetgid      = os.ModeSetgid
	ModeSetuid      = os.ModeSetuid
	ModeSticky      = os.ModeSticky
	NewFile         = os.NewFile
	PathSeparator   = os.PathSeparator
	Stat            = os.Stat
	TempDir         = os.TempDir
)
View Source
var (
	Mkdir    = os.Mkdir
	OpenFile = os.OpenFile
)
View Source
var PrefixAndSuffix = prefixAndSuffix

Functions

func MkdirTemp

func MkdirTemp(dir, pattern string, perm FileMode) (string, error)

func Uitoa

func Uitoa(val uint) string

Types

type File

type File = os.File

func CreateTemp

func CreateTemp(dir, pattern string, perm FileMode) (*File, error)

type FileMode

type FileMode = os.FileMode

type PathError

type PathError = os.PathError

Directories

Path Synopsis
syscall
windows/registry
Package registry provides access to the Windows registry.
Package registry provides access to the Windows registry.
windows/sysdll
Package sysdll is an internal leaf package that records and reports which Windows DLL names are used by Go itself.
Package sysdll is an internal leaf package that records and reports which Windows DLL names are used by Go itself.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL