behavior

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 11 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",
}
View Source
var ProbeMode_value = map[string]int32{
	"ProbeModeDefault": 0,
	"ProbeModeProbe":   1,
	"ProbeModeAssume":  2,
}

Functions

func DecomposesUnicode

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

DecomposesUnicode determines whether or not the specified directory (and its underlying filesystem) decomposes Unicode filenames.

func DecomposesUnicodeByPath

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

DecomposesUnicodeByPath determines whether or not the filesystem on which the directory at the specified path resides decomposes Unicode filenames.

func PreservesExecutability

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

PreservesExecutability determines whether or not the specified directory (and its underlying filesystem) preserves POSIX executability bits.

func PreservesExecutabilityByPath

func PreservesExecutabilityByPath(path string, probeMode ProbeMode) (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.

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) EnumDescriptor

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

func (ProbeMode) IsDefault

func (m ProbeMode) IsDefault() bool

IsDefault indicates whether or not the probe mode is ProbeMode_ProbeModeDefault.

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) 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