path

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base

func Base(_ context.Context, args ...core.Value) (core.Value, error)

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

func Clean

func Clean(_ context.Context, args ...core.Value) (core.Value, error)

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

func Dir

func Dir(_ context.Context, args ...core.Value) (core.Value, error)

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

func Ext

func Ext(_ context.Context, args ...core.Value) (core.Value, error)

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

func IsAbs

func IsAbs(_ context.Context, args ...core.Value) (core.Value, error)

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

func Join

func Join(_ context.Context, args ...core.Value) (core.Value, error)

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

func Match

func Match(_ context.Context, args ...core.Value) (core.Value, error)

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

func RegisterLib

func RegisterLib(ns core.Namespace) error

RegisterLib register `PATH` namespace functions. @namespace PATH

func Separate

func Separate(_ context.Context, args ...core.Value) (core.Value, error)

SEPARATE separates the path into a directory and filename component. @param {String} path - 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