files

package
v0.0.0-...-0518d83 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixName

func FixName(name string) string

func GetCommandExec

func GetCommandExec(pkg, cmd string) (string, error)

func MoveFile

func MoveFile(source, destination string) error

MoveFile allows moving the file across drives compared to os.Rename

func NewScanner

func NewScanner(r io.Reader) *bufio.Scanner

func NewScannerBuf

func NewScannerBuf(r io.Reader, bufSize int) *bufio.Scanner

func NewUnicodeReader

func NewUnicodeReader(r io.Reader) io.Reader

Types

type FileMap

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

func NewFileMap

func NewFileMap(path string) (*FileMap, error)

func (*FileMap) GetFile

func (f *FileMap) GetFile(path string) (string, error)

type NamedPipe

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

func NewNamedPipe

func NewNamedPipe(name string) (*NamedPipe, error)

NewNamedPipe creates a new named pipe to use in IPC (Inter-process communication) If name is empty, it generates a random 32 character hex string Warning: name provided is only a hint, if you want to use this pipe in IPC, retrieve the name by (*NamedPipe).Name()

func (*NamedPipe) Close

func (namedPipe *NamedPipe) Close() (err error)

func (*NamedPipe) Name

func (namedPipe *NamedPipe) Name() string

Name returns a system name of the pipe to use in IPC

func (*NamedPipe) Read

func (namedPipe *NamedPipe) Read(p []byte) (n int, err error)

func (*NamedPipe) Write

func (namedPipe *NamedPipe) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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