fileattr

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fileattr describes the set of file attributes used by the Windows operating system.

https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants

Index

Constants

This section is empty.

Variables

View Source
var FormatC = Format{
	Readonly:           "FILE_ATTRIBUTE_READONLY",
	Hidden:             "FILE_ATTRIBUTE_HIDDEN",
	System:             "FILE_ATTRIBUTE_SYSTEM",
	Directory:          "FILE_ATTRIBUTE_DIRECTORY",
	Archive:            "FILE_ATTRIBUTE_ARCHIVE",
	Device:             "FILE_ATTRIBUTE_DEVICE",
	Normal:             "FILE_ATTRIBUTE_NORMAL",
	Temporary:          "FILE_ATTRIBUTE_TEMPORARY",
	SparseFile:         "FILE_ATTRIBUTE_SPARSE_FILE",
	ReparsePoint:       "FILE_ATTRIBUTE_REPARSE_POINT",
	Compressed:         "FILE_ATTRIBUTE_COMPRESSED",
	Offline:            "FILE_ATTRIBUTE_OFFLINE",
	NotContentIndexed:  "FILE_ATTRIBUTE_NOT_CONTENT_INDEXED",
	Encrypted:          "FILE_ATTRIBUTE_ENCRYPTED",
	IntegrityStream:    "FILE_ATTRIBUTE_INTEGRITY_STREAM",
	Virtual:            "FILE_ATTRIBUTE_VIRTUAL",
	NoScrubData:        "FILE_ATTRIBUTE_NO_SCRUB_DATA",
	RecallOnOpen:       "FILE_ATTRIBUTE_RECALL_ON_OPEN",
	RecallOnDataAccess: "FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS",
}

FormatC maps values to C-style constant strings.

View Source
var FormatCode = Format{
	Readonly:           "R",
	Hidden:             "H",
	System:             "S",
	Directory:          "D",
	Archive:            "A",
	Device:             "^",
	Normal:             "N",
	Temporary:          "T",
	SparseFile:         "P",
	ReparsePoint:       "L",
	Compressed:         "C",
	Offline:            "O",
	NotContentIndexed:  "I",
	Encrypted:          "E",
	IntegrityStream:    "V",
	Virtual:            "-",
	NoScrubData:        "X",
	RecallOnOpen:       "!",
	RecallOnDataAccess: "?",
}

FormatCode maps values to single-letter codes.

https://superuser.com/questions/44812/windows-explorers-file-attribute-column-values

View Source
var FormatGo = Format{
	Readonly:           "Readonly",
	Hidden:             "Hidden",
	System:             "System",
	Directory:          "Directory",
	Archive:            "Archive",
	Device:             "Device",
	Normal:             "Normal",
	Temporary:          "Temporary",
	SparseFile:         "SparseFile",
	ReparsePoint:       "ReparsePoint",
	Compressed:         "Compressed",
	Offline:            "Offline",
	NotContentIndexed:  "NotContentIndexed",
	Encrypted:          "Encrypted",
	IntegrityStream:    "IntegrityStream",
	Virtual:            "Virtual",
	NoScrubData:        "NoScrubData",
	RecallOnOpen:       "RecallOnOpen",
	RecallOnDataAccess: "RecallOnDataAccess",
}

FormatGo maps values to Go-style constant strings.

Functions

This section is empty.

Types

type Format

type Format map[Value]string

Format describes a format for file attributes flags.

type Value

type Value uint32

Value describes a set of file attributes stored as part of a file's metadata.

const (
	Readonly           Value = 0x000001 // FILE_ATTRIBUTE_READONLY
	Hidden             Value = 0x000002 // FILE_ATTRIBUTE_HIDDEN
	System             Value = 0x000004 // FILE_ATTRIBUTE_SYSTEM
	Directory          Value = 0x000010 // FILE_ATTRIBUTE_DIRECTORY
	Archive            Value = 0x000020 // FILE_ATTRIBUTE_ARCHIVE
	Device             Value = 0x000040 // FILE_ATTRIBUTE_DEVICE
	Normal             Value = 0x000080 // FILE_ATTRIBUTE_NORMAL
	Temporary          Value = 0x000100 // FILE_ATTRIBUTE_TEMPORARY
	SparseFile         Value = 0x000200 // FILE_ATTRIBUTE_SPARSE_FILE
	ReparsePoint       Value = 0x000400 // FILE_ATTRIBUTE_REPARSE_POINT
	Compressed         Value = 0x000800 // FILE_ATTRIBUTE_COMPRESSED
	Offline            Value = 0x001000 // FILE_ATTRIBUTE_OFFLINE
	NotContentIndexed  Value = 0x002000 // FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
	Encrypted          Value = 0x004000 // FILE_ATTRIBUTE_ENCRYPTED
	IntegrityStream    Value = 0x008000 // FILE_ATTRIBUTE_INTEGRITY_STREAM
	Virtual            Value = 0x010000 // FILE_ATTRIBUTE_VIRTUAL
	NoScrubData        Value = 0x020000 // FILE_ATTRIBUTE_NO_SCRUB_DATA
	RecallOnOpen       Value = 0x040000 // FILE_ATTRIBUTE_RECALL_ON_OPEN
	RecallOnDataAccess Value = 0x400000 // FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS
)

File Attributes:

func (Value) Join

func (v Value) Join(sep string, format Format) string

Join returns a string representation of the file attributes using the given separator and format.

func (Value) Match

func (v Value) Match(c Value) bool

Match reports whether v contains all of the file attributes specified by c.

func (Value) String

func (v Value) String() string

String returns a string representation of the file attributes using a default separator and format.

Jump to

Keyboard shortcuts

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