path

package
v2.0.0-alpha.63 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base

func Base(_ context.Context, arg runtime.Value) (runtime.Value, error)

base returns the last component of the path or the path itself if it does not contain any directory separators. @param path {String} The path. @return {String} The last component of the path.

func Clean

func Clean(_ context.Context, arg runtime.Value) (runtime.Value, error)

clean returns the shortest path name equivalent to path. @param path {String} The path. @return {String} The shortest path name equivalent to path

func Dir

dir returns the directory component of path. @param path {String} The path. @return {String} The directory component of path.

func Ext

ext returns the extension of the last component of path. @param path {String} The path. @return {String} The extension of the last component of path.

func IsAbs

func IsAbs(_ context.Context, arg runtime.Value) (runtime.Value, error)

is_abs reports whether the path is absolute. @param path {String} The path. @return {Boolean} True if the path is absolute.

func Join

func Join(ctx context.Context, args ...runtime.Value) (runtime.Value, error)

join joins any number of path elements into a single path, separating them with slashes. @param elements {String, repeated | String[]} The path elements @return {String} Single path from the given elements.

func Match

func Match(_ context.Context, arg1, arg2 runtime.Value) (runtime.Value, error)

match reports whether name matches the pattern. @param pattern {String} The pattern. @param name {String} The name. @return {Boolean} True if the name matches the pattern.

func RegisterLib

func RegisterLib(ns runtime.Namespace)

RegisterLib registers all path functions exclusively in the path namespace. @namespace path

func Separate

func Separate(_ context.Context, arg runtime.Value) (runtime.Value, error)

separate separates the path into a directory and filename component. @param path {String} The path @return {Any[]} First item is a directory component, and second is a filename component.

Types

This section is empty.

Jump to

Keyboard shortcuts

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