fina

package
v0.0.140 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fina provides function to change file names

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilePartsInfo

type FilePartsInfo struct {
	Path           string
	Name           string
	Ext            string
	NameWithoutExt string
}

func GetFilePartsInfo

func GetFilePartsInfo(file string) *FilePartsInfo

func (*FilePartsInfo) NewExt

func (fpi *FilePartsInfo) NewExt(ext string) string

Return new filename with new extension was: /some/path/file.ext will: /some/path/file<.newext>

func (*FilePartsInfo) PS added in v0.0.56

func (fpi *FilePartsInfo) PS(prefix, suffix string) string

Return new filename with Prefix and Suffix was: /some/path/file.ext will: /some/path/<prefix>file<suffix>.ext --------------------------------- prefix: "demo-" suffix: "-omed" will: /some/path/demo-file-omed.ext

func (*FilePartsInfo) PSWithNewExt added in v0.0.56

func (fpi *FilePartsInfo) PSWithNewExt(prefix, suffix, ext string) string

Return new filename with new extension and prefix and suffix was: /some/path/file.ext will: /some/path/<prefix>file<suffix><.newext>

func (*FilePartsInfo) Prefix

func (fpi *FilePartsInfo) Prefix(prefix string) string

Return new filename with Prefix was: /some/path/file.ext will: /some/path/<prefix>file.ext --------------------------------- prefix: "demo-" will: /some/path/demo-file.ext

func (*FilePartsInfo) PrefixWithNewExt

func (fpi *FilePartsInfo) PrefixWithNewExt(prefix, ext string) string

Return new filename with new extension and prefix was: /some/path/file.ext will: /some/path/<prefix>file<.newext>

func (*FilePartsInfo) Suffix added in v0.0.55

func (fpi *FilePartsInfo) Suffix(suffix string) string

Return new filename with Suffix was: /some/path/file.ext will: /some/path/file<suffix>.ext --------------------------------- suffix: "-demo" will: /some/path/file-demo.ext

func (*FilePartsInfo) SuffixWithNewExt added in v0.0.55

func (fpi *FilePartsInfo) SuffixWithNewExt(suffix, ext string) string

Return new filename with new extension and suffix was: /some/path/file.ext will: /some/path/file<suffix><.newext>

Jump to

Keyboard shortcuts

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