stdio

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const (
	EOF      = -2
	SEEK_SET = int32(io.SeekStart)
	SEEK_CUR = int32(io.SeekCurrent)
	SEEK_END = int32(io.SeekEnd)
)
View Source
const GlobNoEscape = 1

Variables

This section is empty.

Functions

func Access

func Access(path *byte, flags int32) int32

func Chdir

func Chdir(path *byte) int32

func Create

func Create(path *byte, mode csys.Mode) uintptr

func Dprintf

func Dprintf(format string, args ...interface{}) int

func FDControl

func FDControl(fd uintptr, flags int32, ctls ...interface{}) int32

func Fprintf

func Fprintf(file *File, format string, args ...interface{}) int

func FprintfGo

func FprintfGo(w io.Writer, format string, args ...interface{}) (int, error)

func FprintlnfGo

func FprintlnfGo(w io.Writer, format string, args ...interface{}) (int, error)

func Fscanf

func Fscanf(file *File, format string, args ...interface{}) int

func FscanfGo

func FscanfGo(r io.Reader, format string, args ...interface{}) (int, error)

func GetCwd

func GetCwd(p *byte, sz int) *byte

func Lseek

func Lseek(fd uintptr, offs uint64, whence int32) uint64

func Open

func Open(path *byte, flags int32, ctls ...interface{}) uintptr

func Printf

func Printf(format string, args ...interface{}) int

func Remove

func Remove(path string, _ ...interface{}) int

func Rename

func Rename(path1, path2 string, _ ...interface{}) int

func Rmdir

func Rmdir(path *byte) int32

func Scanf

func Scanf(format string, args ...interface{}) int

func SetFS

func SetFS(fs Filesystem)

func Snprintf

func Snprintf(buf *byte, sz int, format string, args ...interface{}) int

func Sprintf

func Sprintf(buf *byte, format string, args ...interface{}) int

func Sscanf

func Sscanf(buf *byte, format string, args ...interface{}) int
func Unlink(path *byte) int32

func Vfprintf

func Vfprintf(file *File, format string, args libc.ArgList) int

func Vfscanf

func Vfscanf(file *File, format string, args libc.ArgList) int

func Vprintf

func Vprintf(format string, args libc.ArgList) int

func Vscanf

func Vscanf(format string, args libc.ArgList) int

func Vsnprintf

func Vsnprintf(buf *byte, sz int, format string, args libc.ArgList) int

func Vsprintf

func Vsprintf(buf *byte, format string, args libc.ArgList) int

func Vsscanf

func Vsscanf(buf *byte, format string, args libc.ArgList) int

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func ByFD

func ByFD(fd uintptr) *File

func FDOpen

func FDOpen(fd uintptr, mode string) *File

func FDOpenS

func FDOpenS(fd uintptr, mode string) *File

func FOpen

func FOpen(path, mode string) *File

func FReOpen

func FReOpen(path, mode string, f *File) *File

func OpenFrom

func OpenFrom(f FileI) *File

func Stderr

func Stderr() *File

func Stdin

func Stdin() *File

func Stdout

func Stdout() *File

func (*File) Close

func (f *File) Close() int32

func (*File) Error

func (f *File) Error() int64

func (*File) FileNo

func (f *File) FileNo() uintptr

func (*File) Flush

func (f *File) Flush() int32

func (*File) GetC

func (f *File) GetC() int

func (*File) GetS

func (f *File) GetS(buf *byte, sz int32) *byte

func (*File) IsEOF

func (f *File) IsEOF() int32

func (*File) PutC

func (f *File) PutC(c int) int64

func (*File) PutS

func (f *File) PutS(s *byte) int64

func (*File) Read

func (f *File) Read(p *byte, sz int) int32

func (*File) ReadN

func (f *File) ReadN(p *byte, size, cnt int) int32

func (*File) Scanf

func (f *File) Scanf(format string, args ...interface{}) int64

func (*File) Seek

func (f *File) Seek(off int64, whence int32) int32

func (*File) SetErr

func (f *File) SetErr(err error)

func (*File) Tell

func (f *File) Tell() int64

func (*File) UnGetC

func (f *File) UnGetC(c int) int

func (*File) Write

func (f *File) Write(p *byte, sz int) int32

func (*File) WriteN

func (f *File) WriteN(p *byte, size, cnt int) int32

type FileI

type FileI interface {
	Fd() uintptr
	Name() string
	Sync() error
	io.Reader
	io.Writer
	io.Seeker
	io.Closer
}

type Filesystem

type Filesystem interface {
	Stdout() FileI
	Stderr() FileI
	Stdin() FileI
	Getwd() (string, error)
	Chdir(path string) error
	Rmdir(path string) error
	Unlink(path string) error
	Open(path string, flag int, mode os.FileMode) (FileI, error)
	Stat(path string) (os.FileInfo, error)
}

func FS

func FS() Filesystem

func NewLocalFS

func NewLocalFS() Filesystem

type Glob

type Glob struct {
	Num     int32
	Paths   **byte
	Reserve int32
}

func (*Glob) Free

func (g *Glob) Free()

func (*Glob) Glob

func (g *Glob) Glob(pattern *byte, flags int32, errFunc func(epath *byte, errno int32) int32) int32

Jump to

Keyboard shortcuts

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