Documentation ¶
Index ¶
- Constants
- Variables
- func Chdir(dir string) error
- func Chmod(name string, mode FileMode) error
- func Chtimes(name string, atime time.Time, mtime time.Time) error
- func Environ() []string
- func Executable() (string, error)
- func Exit(code int)
- func Expand(s string, mapping func(string) string) string
- func ExpandEnv(s string) string
- func Getenv(key string) string
- func Getpagesize() int
- func Getuid() int
- func Getwd() (dir string, err error)
- func IsExist(err error) bool
- func IsNotExist(err error) bool
- func IsPathSeparator(c uint8) bool
- func IsPermission(err error) bool
- func LookupEnv(key string) (string, bool)
- func Mkdir(name string, perm FileMode) error
- func MkdirAll(path string, perm FileMode) error
- func MkdirTemp(dir, pattern string) (string, error)
- func ReadDir(name string) ([]fs.DirEntry, error)
- func ReadFile(name string) ([]byte, error)
- func Readlink(name string) (string, error)
- func Remove(name string) error
- func RemoveAll(path string) error
- func Rename(oldpath, newpath string) error
- func SameFile(fi1, fi2 FileInfo) bool
- func Setenv(key, value string) error
- func Symlink(oldname, newname string) error
- func TempDir() string
- func UserCacheDir() (string, error)
- func UserConfigDir() (string, error)
- func UserHomeDir() (string, error)
- func WriteFile(name string, data []byte, perm FileMode) error
- type File
- func (f File) Close() error
- func (f File) Fd() uintptr
- func (f File) Getosfile() *os.File
- func (f File) Name() string
- func (f File) Read(b []byte) (n int, err error)
- func (f File) ReadAt(b []byte, off int64) (n int, err error)
- func (f File) ReadDir(n int) ([]fs.DirEntry, error)
- func (f File) Readdirnames(n int) (names []string, err error)
- func (f File) Seek(offset int64, whence int) (ret int64, err error)
- func (f File) Stat() (FileInfo, error)
- func (f File) Sync() error
- func (f File) Truncate(size int64) error
- func (f File) Write(b []byte) (n int, err error)
- func (f File) WriteAt(b []byte, off int64) (n int, err error)
- func (f File) WriteString(s string) (n int, err error)
- type FileInfo
- type FileMode
- type LinkError
- type PathError
- type Signal
- type SyscallError
Constants ¶
View Source
const ( SEEK_SET int = os.SEEK_SET //= 0 // seek relative to the origin of the file SEEK_CUR int = os.SEEK_CUR // 1 // seek relative to the current offset SEEK_END int = os.SEEK_END )
View Source
const ( // Exactly one of O_RDONLY, O_WRONLY, or O_RDWR must be specified. O_RDONLY int = os.O_RDONLY //syscall.O_RDONLY // open the file read-only. O_WRONLY int = os.O_WRONLY // syscall.O_WRONLY // open the file write-only. O_RDWR int = os.O_RDWR //syscall.O_RDWR // open the file read-write. // The remaining values may be or'ed in to control behavior. O_APPEND int = os.O_APPEND //syscall.O_APPEND // append data to the file when writing. O_CREATE int = os.O_CREATE //syscall.O_CREAT // create a new file if none exists. O_EXCL int = os.O_EXCL //syscall.O_EXCL // used with O_CREATE, file must not exist. O_SYNC int = os.O_SYNC //syscall.O_SYNC // open for synchronous I/O. O_TRUNC int = os.O_TRUNC //syscall.O_TRUNC // truncate regular writable file when opened. )
View Source
const ( ModeSymlink = os.ModeSymlink ModeSetgid = os.ModeSetgid ModeType = os.ModeType )
View Source
const DevNull = os.DevNull
Variables ¶
View Source
var Args []string = os.Args
View Source
var ErrClosed = os.ErrClosed
View Source
var ErrNotExist = os.ErrNotExist
View Source
var Interrupt = os.Interrupt
View Source
var PathSeparator = os.PathSeparator
Functions ¶
func Executable ¶
func Getpagesize ¶
func Getpagesize() int
func IsNotExist ¶
func IsPathSeparator ¶
func IsPermission ¶
func ReadFile ¶
ReadFile reads the named file and returns the contents. A successful call returns err == nil, not err == EOF. Because ReadFile reads the whole file, it does not treat an EOF from Read as an error to be reported.
func UserCacheDir ¶
func UserConfigDir ¶
func UserHomeDir ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func CreateTemp ¶
type SyscallError ¶
type SyscallError = os.SyscallError
Click to show internal directories.
Click to hide internal directories.