filehelper

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

文件操作

  • Mkdir
  • Remove
  • Move
  • IsDir
  • IsFile
  • Pwd
  • Home
  • Stat
  • Basename
  • Dir
  • Ext
  • ExtName
  • TempDir
  • Glob
  • FileGetContent
  • FilePutContent

Documentation

Index

Constants

View Source
const (
	Separator = string(filepath.Separator)
)

Variables

This section is empty.

Functions

func Basename

func Basename(path string) string

func Dir

func Dir(path string) string

func Ext

func Ext(path string) string

func ExtName

func ExtName(path string) string

func FileGetContent

func FileGetContent(path string) (string, error)

func FilePutContent

func FilePutContent(path string, content string, isAppend bool) error

func Glob

func Glob(pattern string, onlyNames bool) ([]string, error)

func Home

func Home() (dir string, err error)

func IsDir

func IsDir(path string) bool

func IsFile

func IsFile(path string) bool

func Mkdir

func Mkdir(path string) error

func Move

func Move(src string, dst string) error

func Pwd

func Pwd() string

func Remove

func Remove(path string) error

func Stat

func Stat(path string) (os.FileInfo, error)

func TempDir

func TempDir(names ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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