upath

package
v1.20240717.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Zero = UPath{/* contains filtered or unexported fields */}

Functions

func FSPaths

func FSPaths(ups []UPath) []string

Types

type Import

type Import[T NewMaker[T]] struct {
	UPath   UPath
	ModTime time.Time `toml:"-"`
	Value   T         `toml:"-"`
}

func (*Import[T]) RebuildByType

func (im *Import[T]) RebuildByType(fsys fs.FS) error

func (*Import[T]) UnmarshalTOML

func (im *Import[T]) UnmarshalTOML(decode func(interface{}) error) error

type NewMaker

type NewMaker[T any] interface {
	MakeNew() T
}

type UPath

type UPath struct {
	// contains filtered or unexported fields
}

func MustNew

func MustNew(uni_name string) UPath

func MustNewByOS

func MustNewByOS(os_name string) UPath

func New

func New(uni_name string) (UPath, error)

func NewByOS

func NewByOS(os_name string) (UPath, error)

func (UPath) FSPath

func (up UPath) FSPath() string

func (UPath) IsZero

func (up UPath) IsZero() bool

func (UPath) Join

func (up UPath) Join(names ...string) (UPath, error)

func (*UPath) MarshalText

func (up *UPath) MarshalText() ([]byte, error)

func (UPath) MustJoin

func (up UPath) MustJoin(names ...string) UPath

func (UPath) Open

func (up UPath) Open(fsys fs.FS) (fs.File, error)

func (UPath) ReadDir

func (up UPath) ReadDir(fsys fs.FS) ([]fs.DirEntry, error)

func (UPath) ReadFile

func (up UPath) ReadFile(fsys fs.FS) ([]byte, error)

func (UPath) Stat

func (up UPath) Stat(fsys fs.FS) (fs.FileInfo, error)

func (UPath) String

func (up UPath) String() string

func (UPath) Sub

func (up UPath) Sub(fsys fs.FS) (fs.FS, error)

func (*UPath) UnmarshalTOML

func (up *UPath) UnmarshalTOML(decode func(interface{}) error) error

Jump to

Keyboard shortcuts

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