fs

package
v0.0.0-...-5f4d853 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModuleChdir = starlark.NewBuiltin("fs.chdir", chdir)
View Source
var ModuleCmp = starlark.NewBuiltin("fs.cmp", cmp)
View Source
var ModuleCmpFile = starlark.NewBuiltin("fs.cmp_file", cmpFile)
View Source
var ModuleCmpPath = starlark.NewBuiltin("fs.cmp_path", cmpPath)
View Source
var ModuleCopy = starlark.NewBuiltin("fs.copy", copyImpl)
View Source
var ModuleExists = starlark.NewBuiltin("fs.exists", exists)
View Source
var ModuleFind = starlark.NewBuiltin("fs.find", find)
View Source
var ModuleJoin = starlark.NewBuiltin("fs.join", join)
View Source
var ModuleMkdir = starlark.NewBuiltin("fs.mkdir", mkdir)
View Source
var ModuleMove = starlark.NewBuiltin("fs.move", move)
View Source
var ModulePopd = starlark.NewBuiltin("fs.popd", popd)
View Source
var ModulePwd = starlark.NewBuiltin("fs.pwd", pwd)
View Source
var ModuleRead = starlark.NewBuiltin("fs.read", read)
View Source
var ModuleReaddir = starlark.NewBuiltin("fs.readdir", readdir)
View Source
var ModuleRemove = starlark.NewBuiltin("fs.remove", remove)
View Source
var ModuleTouch = starlark.NewBuiltin("fs.touch", touch)
View Source
var ModuleWrite = starlark.NewBuiltin("fs.write", write)

Functions

func AssertParentDir

func AssertParentDir(path string, mkdir bool) error

func CopyDir

func CopyDir(from string, to string) error

func CopyFile

func CopyFile(from string, to string) error

func CopyPath

func CopyPath(from string, to string, force bool) error

func IsPathWithin

func IsPathWithin(smallerPath string, biggerPath string) (bool, error)

func IsSamePath

func IsSamePath(firstPath string, secondPath string) bool

Types

type FileEntry

type FileEntry struct {
	AbsPath  string
	BaseName string
	Dir      string
	Ext      string
	Name     string
	Path     string
}

FileEntry

func NewFileEntry

func NewFileEntry(path string) (result *FileEntry, err error)

func (*FileEntry) Attr

func (fe *FileEntry) Attr(name string) (strlk.Value, error)

func (*FileEntry) AttrNames

func (fe *FileEntry) AttrNames() []string

func (*FileEntry) Freeze

func (fe *FileEntry) Freeze()

func (*FileEntry) Hash

func (fe *FileEntry) Hash() (uint32, error)

func (*FileEntry) Init

func (fe *FileEntry) Init(path string) (err error)

func (*FileEntry) String

func (fe *FileEntry) String() string

func (*FileEntry) Truth

func (fe *FileEntry) Truth() strlk.Bool

func (*FileEntry) Type

func (fe *FileEntry) Type() string

type StatFileEntry

type StatFileEntry struct {
	FileEntry
	Kind StatFileEntryKind
	// AbsPath       string
	// BaseDir       string
	// BaseName      string
	IsSymlink     bool
	SymlinkTarget string
}

func FromPath

func FromPath(p string) (*StatFileEntry, error)

func (*StatFileEntry) Attr

func (fe *StatFileEntry) Attr(name string) (result strlk.Value, err error)

func (*StatFileEntry) AttrNames

func (fe *StatFileEntry) AttrNames() []string

func (*StatFileEntry) Freeze

func (fe *StatFileEntry) Freeze()

func (*StatFileEntry) Hash

func (fe *StatFileEntry) Hash() (uint32, error)

func (*StatFileEntry) String

func (fe *StatFileEntry) String() string

func (*StatFileEntry) Truth

func (fe *StatFileEntry) Truth() strlk.Bool

func (*StatFileEntry) Type

func (fe *StatFileEntry) Type() string

type StatFileEntryKind

type StatFileEntryKind string

{{{1 StatFileEntry

const (
	FileEntryDir  StatFileEntryKind = "Dir"
	FileEntryFile                   = "File"
)

Jump to

Keyboard shortcuts

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