redirfd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Some file descriptor manipulation funcs, inspired by https://github.com/skarnet/execline/blob/master/src/execline/redirfd.c

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedirectMode

type RedirectMode int
const (
	Read           RedirectMode = iota // open file for reading
	Write                              // open file for writing, truncating if it exists
	Update                             // open file for read & write
	Append                             // open file for append, create if it does not exist
	AppendExisting                     // open file for append, do not create if it does not already exist
	WriteNew                           // open file for writing, creating it, failing if it already exists
)

func (RedirectMode) Redirect

func (mode RedirectMode) Redirect(nonblock, changemode bool, fd int, name string) (*os.File, error)

see https://github.com/skarnet/execline/blob/master/src/execline/redirfd.c

Jump to

Keyboard shortcuts

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