cmdPath

package module
v0.0.0-...-1b15b8d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: GPL-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RcFiles = []Path{

	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},

	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},

	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
	{/* contains filtered or unexported fields */},
}

Functions

func FileRead

func FileRead(fn string, ref interface{}) error

FileRead Retrieves data from a local file.

func FileRemove

func FileRemove(fn string) error

FileRemove Removes a file path.

func FileWrite

func FileWrite(fn string, ref interface{}, perm os.FileMode) error

FileWrite Saves data to a file path.

func GrepFiles

func GrepFiles(search string, fps ...Path) ([]string, error)

func PlainFileRead

func PlainFileRead(fn string) ([]byte, error)

PlainFileRead Retrieves data from a local file.

func PlainFileWrite

func PlainFileWrite(fn string, data []byte, perm os.FileMode) error

PlainFileWrite Saves data to a file path.

func ResolveFile

func ResolveFile(file string) string

Types

type Path

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

func NewPath

func NewPath(path ...string) *Path

func (*Path) Chmod

func (p *Path) Chmod(mode os.FileMode) bool

func (*Path) Copy

func (p *Path) Copy(fp string) error

func (*Path) DirExists

func (p *Path) DirExists() bool

func (*Path) FileExists

func (p *Path) FileExists() bool

func (*Path) FileRead

func (p *Path) FileRead(ref interface{}) error

FileRead Retrieves data from a local file.

func (*Path) FileRemove

func (p *Path) FileRemove() error

FileRemove Removes a file path.

func (*Path) FileWrite

func (p *Path) FileWrite(ref interface{}, perm os.FileMode) error

FileWrite Saves data to a file path.

func (*Path) GrepFile

func (p *Path) GrepFile(search string) (int, error)

func (*Path) Join

func (p *Path) Join(elem ...string) Path

func (*Path) MkdirAll

func (p *Path) MkdirAll() error

func (*Path) ModTime

func (p *Path) ModTime() time.Time

func (*Path) Move

func (p *Path) Move(fp string) error

func (*Path) PlainFileRead

func (p *Path) PlainFileRead() ([]byte, error)

PlainFileRead Retrieves data from a local file.

func (*Path) PlainFileWrite

func (p *Path) PlainFileWrite(data []byte, perm os.FileMode) error

PlainFileWrite Saves data to a file path.

func (*Path) Set

func (p *Path) Set(path ...string)

func (*Path) String

func (p *Path) String() string

Jump to

Keyboard shortcuts

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