
func (p *ProcessState) SystemTime() time.Duration.func (p *Process) Wait() (*ProcessState, error).func (p *Process) Signal(sig Signal) error.func StartProcess(name string, argv string, attr *ProcAttr) (*Process, error).func FindProcess(pid int) (*Process, error).func Stat(name string) (FileInfo, error).func Lstat(name string) (FileInfo, error).func (f *File) WriteString(s string) (n int, err error).func (f *File) WriteAt(b byte, off int64) (n int, err error).func (f *File) Write(b byte) (n int, err error).func (f *File) Truncate(size int64) error.func (f *File) SyscallConn() (syscall.RawConn, error).

func (f *File) Stat() (FileInfo, error).func (f *File) SetWriteDeadline(t time.Time) error.func (f *File) SetReadDeadline(t time.Time) error.func (f *File) SetDeadline(t time.Time) error.func (f *File) Seek(offset int64, whence int) (ret int64, err error).func (f *File) Readdirnames(n int) (names string, err error).func (f *File) Readdir(n int) (FileInfo, error).func (f *File) ReadFrom(r io.Reader) (n int64, err error).



Write take their byte counts from the length of the argument slice.įmt.Printf("read %d bytes: %q\n", count, data) The file's data can then be read into a slice of bytes. If the open fails, the error string will be self-explanatory, like Here is a simple example, opening a file and reading some of it.įile, err := os.Open("file.go") // For read access. The os interface is intended to be uniform across all operating systems.įeatures not generally available appear in the system-specific package syscall. *PathError, which may be unpacked for more information. Will include the failing file name when printed and will be of type If a call that takes a file name fails, such as Open or Stat, the error Often, more information is available within the error. Go-like failing calls return values of type error rather than error numbers. The design is Unix-like, although the error handling is Package os provides a platform-independent interface to operating systemįunctionality. Go – os Index | Examples | Files | Directories package os
