util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefixPath

func AddPrefixPath(prefix string, path string) string

AddPrefixPath gets path that adds the provided the prefix.

func CopyFile

func CopyFile(srcName, dstName string) (written int64, err error)

CopyFile copies a file to other

func CreateFolder

func CreateFolder(path string) error

CreateFolder creates a fold

func CreateTemporaryDir added in v0.2.0

func CreateTemporaryDir() (string, error)

CreateTemporaryDir creates a temporary dir

func GetUniqueIdentifier

func GetUniqueIdentifier(namespace string, name string, kind string) string

GetUniqueIdentifier get unique identifier

func IsDir

func IsDir(path string) bool

IsDir checks whether the given path is a folder

func IsExists

func IsExists(path string) bool

IsExists checks whether the file or folder exists

func IsFile

func IsFile(path string) bool

IsFile checks whether the specified path is a file

func ParsingDatasetIndex added in v0.2.0

func ParsingDatasetIndex(samples []string, prefix string) []string

ParsingDatasetIndex parses index file of dataset and adds the prefix to abs url of sample first line is the prefix, the next lines are abs url of sample

func TrimPrefixPath

func TrimPrefixPath(prefix string, path string) string

TrimPrefixPath gets path without the provided leading prefix path. If path doesn't start with prefix, path is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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