Documentation ¶
Index ¶
- Variables
- func Abs(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func Base(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func Dir(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func IsAbs(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func Join(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func NewAbs() *starlark.Builtin
- func NewBase() *starlark.Builtin
- func NewDir() *starlark.Builtin
- func NewIsAbs() *starlark.Builtin
- func NewJoin() *starlark.Builtin
- func NewSplit() *starlark.Builtin
- func NewSplitext() *starlark.Builtin
- func Split(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func Splitext(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = &starlarkstruct.Module{ Name: "path", Members: starlark.StringDict{ "sep": starlark.String(string([]rune{filepath.Separator})), "is_abs": NewIsAbs(), "abs": NewAbs(), "base": NewBase(), "dir": NewDir(), "join": NewJoin(), "split": NewSplit(), "splitext": NewSplitext(), }, }
def path():
""" The path module provides utility functions for manipulating host-specific paths. This module uses either forward- or backwards-facing slashes for separating path components, depending on the host operating system. """ @attribute def sep(): """ The host-specific path separator. """ @function("isAbs") def is_abs(): pass @function("abs") def abs(): pass @function("base") def base(): pass @function("dir") def dir(): pass @function("Join") def join(): pass @function("split") def split(): pass @function("splitext") def splitext(): pass
Functions ¶
func Join ¶
func Join(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
def join(components):
""" Joins any number of path elements into a single path, separating them with a host-specific separator. Empty elements are ignored. """
func NewSplitext ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.