behavior

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package behavior provides filesystem behavior probing facilities.

Index

Constants

This section is empty.

Variables

View Source
var (
	ProbeMode_name = map[int32]string{
		0: "ProbeModeDefault",
		1: "ProbeModeProbe",
		2: "ProbeModeAssume",
	}
	ProbeMode_value = map[string]int32{
		"ProbeModeDefault": 0,
		"ProbeModeProbe":   1,
		"ProbeModeAssume":  2,
	}
)

Enum value maps for ProbeMode.

View Source
var File_filesystem_behavior_probe_mode_proto protoreflect.FileDescriptor

Functions

func DecomposesUnicode

func DecomposesUnicode(directory *filesystem.Directory, probeMode ProbeMode) (bool, bool, error)

DecomposesUnicode determines whether or not the specified directory (and its underlying filesystem) decomposes Unicode filenames. The second value returned by this function indicates whether or not probe files were used in determining behavior.

func DecomposesUnicodeByPath

func DecomposesUnicodeByPath(path string, probeMode ProbeMode) (bool, bool, error)

DecomposesUnicodeByPath determines whether or not the filesystem on which the directory at the specified path resides decomposes Unicode filenames. The second value returned by this function indicates whether or not probe files were used in determining behavior.

func PreservesExecutability

func PreservesExecutability(directory *filesystem.Directory, probeMode ProbeMode) (bool, bool, error)

PreservesExecutability determines whether or not the specified directory (and its underlying filesystem) preserves POSIX executability bits. The second value returned by this function indicates whether or not probe files were used in determining behavior.

func PreservesExecutabilityByPath

func PreservesExecutabilityByPath(path string, probeMode ProbeMode) (bool, bool, error)

PreservesExecutabilityByPath determines whether or not the filesystem on which the directory at the specified path resides preserves POSIX executability bits. It allows for the path leaf to be a symbolic link. The second value returned by this function indicates whether or not probe files were used in determining behavior.

Types

type ProbeMode

type ProbeMode int32

ProbeMode specifies the mode for filesystem probing.

const (
	// ProbeMode_ProbeModeDefault represents an unspecified probe mode. It
	// should be converted to one of the following values based on the desired
	// default behavior.
	ProbeMode_ProbeModeDefault ProbeMode = 0
	// ProbeMode_ProbeModeProbe specifies that filesystem behavior should be
	// determined using temporary files or, if possible, a "fast-path" mechanism
	// (such as filesystem format detection) that provides quick but certain
	// determination of filesystem behavior.
	ProbeMode_ProbeModeProbe ProbeMode = 1
	// ProbeMode_ProbeModeAssume specifies that filesystem behavior should be
	// assumed based on the underlying platform. This is not as accurate as
	// ProbeMode_ProbeModeProbe.
	ProbeMode_ProbeModeAssume ProbeMode = 2
)

func (ProbeMode) Description

func (m ProbeMode) Description() string

Description returns a human-readable description of a probe mode.

func (ProbeMode) Descriptor added in v0.13.0

func (ProbeMode) Descriptor() protoreflect.EnumDescriptor

func (ProbeMode) Enum added in v0.13.0

func (x ProbeMode) Enum() *ProbeMode

func (ProbeMode) EnumDescriptor deprecated

func (ProbeMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProbeMode.Descriptor instead.

func (ProbeMode) IsDefault

func (m ProbeMode) IsDefault() bool

IsDefault indicates whether or not the probe mode is ProbeMode_ProbeModeDefault.

func (ProbeMode) Number added in v0.13.0

func (x ProbeMode) Number() protoreflect.EnumNumber

func (ProbeMode) String

func (x ProbeMode) String() string

func (ProbeMode) Supported

func (m ProbeMode) Supported() bool

Supported indicates whether or not a particular probe mode is a valid, non-default value.

func (ProbeMode) Type added in v0.13.0

func (*ProbeMode) UnmarshalText

func (m *ProbeMode) UnmarshalText(textBytes []byte) error

UnmarshalText implements the text unmarshalling interface used when loading from TOML files.

Directories

Path Synopsis
internal
format
Package format provides filesystem format enumerations and querying functions.
Package format provides filesystem format enumerations and querying functions.

Jump to

Keyboard shortcuts

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