file

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package file implements file utils.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLibraryEmpty    = errors.New("library name is empty")
	ErrLibraryNotFound = errors.New("library not found")
)

Functions

func CheckExecutable

func CheckExecutable(file string) error

func CheckFDLimitSupported added in v0.2.0

func CheckFDLimitSupported() bool

func FindLibrary added in v0.0.5

func FindLibrary(name string, opts ...OpOption) (string, error)

func GetLimit added in v0.2.0

func GetLimit() (uint64, error)

returns the current file descriptor limit for the host, not for the current process. for the current process, use syscall.Getrlimit.

func LocateExecutable

func LocateExecutable(bin string) (string, error)

Types

type Op added in v0.0.5

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

type OpOption added in v0.0.5

type OpOption func(*Op)

func WithSearchDirs added in v0.0.5

func WithSearchDirs(paths ...string) OpOption

Jump to

Keyboard shortcuts

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