file_path

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAbsPath

func GetAbsPath(p string) (string, error)

func GetBinDir

func GetBinDir() (string, error)

func GetBinDirOrFatal

func GetBinDirOrFatal() string

func GetFileName

func GetFileName(target string) string

func GetFullFileName added in v0.0.2

func GetFullFileName(target string) string

func IsAbs

func IsAbs(p string) bool

func IsFile

func IsFile(path string) bool

func MakeCurTimeDir

func MakeCurTimeDir(parent string, opts ...Option) (string, error)

func MakeDirOrFatal

func MakeDirOrFatal(p string)

func NameNoExt

func NameNoExt(file fs.FileInfo) string

func PathExistOrCreate

func PathExistOrCreate(path string) (bool, error)

func PathExists

func PathExists(path string) (bool, error)

func PathExistsOrFatal

func PathExistsOrFatal(path string) bool

func PathIsDir

func PathIsDir(path string) (bool, error)

func PathIsDirOrFatal

func PathIsDirOrFatal(path string) bool

func RemovePrefixN

func RemovePrefixN(target string, n int) string

func RemoveSuffixN

func RemoveSuffixN(target string, n int) string

func TargetContains

func TargetContains(p, sub string) bool

Types

type Option

type Option func(o *option)

func WithSuffix

func WithSuffix(suffix string) Option

Jump to

Keyboard shortcuts

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