unix

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package unix exports an Elvish namespace that contains variables and functions that deal with features unique to Unix-like operating systems. On non-Unix operating systems it exports an empty namespace.

Index

Constants

View Source
const ExposeUnixNs = true

ExposeUnixNs indicate whether this module should be exposed as a usable elvish namespace.

Variables

View Source
var Ns = eval.BuildNs().
	AddVars(map[string]vars.Var{
		"umask":   UmaskVariable{},
		"rlimits": rlimitsVar{},
	}).Ns()

Ns is an Elvish namespace that contains variables and functions that deal with features unique to Unix-like operating systems.

Functions

This section is empty.

Types

type UmaskVariable

type UmaskVariable struct{}

UmaskVariable is a variable whose value always reflects the current file creation permission mask. Setting it changes the current file creation permission mask for the process (not an individual thread).

func (UmaskVariable) Get

func (UmaskVariable) Get() any

Get returns the current file creation umask as a string.

func (UmaskVariable) Set

func (UmaskVariable) Set(v any) error

Set changes the current file creation umask. It can be called with a string or a number. Strings are treated as octal numbers by default, unless they have an explicit base prefix like 0x or 0b.

Jump to

Keyboard shortcuts

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