posix

package
v4.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	tree.N
}

FileInfo wraps a tree.Node as a posix os.FileInfo

func NewFileInfo

func NewFileInfo(n tree.N) *FileInfo

NewFileInfo wraps a tree.N as posix FileInfo

func (*FileInfo) IsDir

func (f *FileInfo) IsDir() bool

IsDir returns the opposite of node.IsLeaf()

func (*FileInfo) ModTime

func (f *FileInfo) ModTime() time.Time

ModTime returns a time.Time from the node timestamp

func (*FileInfo) Mode

func (f *FileInfo) Mode() (mode os.FileMode)

Mode computes an os.FileMode based on the node.Type value

func (*FileInfo) Name

func (f *FileInfo) Name() string

Name returns the basename of the current file

func (*FileInfo) Size

func (f *FileInfo) Size() int64

Size returns the node.GetSize() value

func (*FileInfo) String

func (f *FileInfo) String() string

String implements Stringer for the current FileInfo

func (*FileInfo) Sys

func (f *FileInfo) Sys() interface{}

Sys returns the underlying *tree.Node

Jump to

Keyboard shortcuts

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