path

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 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. @params path (String) - The path. @returns (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. @params path (String) - The path. @returns (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. @params path (String) - The path. @returns (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. @params path (String) - The path. @returns (String) - The extension of the last component of path.

func IsAbs

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

IsAbs reports whether the path is absolute. @params path (String) - The path. @returns (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 elem (String...|Array<String>) - The path elements @returns (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 pattern (String) - The pattern. @param name (String) - The name. @returns (Boolean) - True if the name mathes the pattern.

func RegisterLib

func RegisterLib(ns core.Namespace) error

RegisterLib register `PATH` namespace functions.

func Separate

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

Separate separates the path into a directory and filename component. @param path (String) - The path @returns (Array) - 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