fileT

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enter

type Enter struct{}

func (Enter) GetBasename

func (f Enter) GetBasename(filePath string) string

GetBasename returns the base name of the file

func (Enter) GetDir

func (f Enter) GetDir(filePath string) string

GetDir returns the directory of the file

func (Enter) GetExt

func (f Enter) GetExt(filePath string) string

GetExt returns the extension of the file

func (Enter) GetMTime

func (f Enter) GetMTime(filePath string) (int64, error)

GetMTime returns the modification time of the file

func (Enter) GetSize

func (f Enter) GetSize(filePath string) (size int64, err error)

GetSize returns the size of the file

func (Enter) IsDir

func (f Enter) IsDir(filePath string) bool

IsDir checks whether the path is a directory

func (Enter) IsExist

func (f Enter) IsExist(filePath string) bool

IsExist checks whether a file or directory exists

func (Enter) IsFile

func (f Enter) IsFile(filePath string) bool

IsFile checks whether the path is a file,

func (Enter) ReadBytes

func (f Enter) ReadBytes(filePath string) ([]byte, error)

ReadBytes reads bytes from a file

func (Enter) ReadLines

func (f Enter) ReadLines(filePath string) ([]string, error)

ReadLines reads lines from a file

func (Enter) ReadString

func (f Enter) ReadString(filePath string) (string, error)

ReadString reads string from a file

func (Enter) Remove

func (f Enter) Remove(path string) error

Remove removes a file or directory

func (Enter) Rename

func (f Enter) Rename(filePath string, to string) error

Rename renames a file

func (Enter) SelfDir

func (f Enter) SelfDir() string

SelfDir returns the directory of the current executable file

func (Enter) SelfPath

func (f Enter) SelfPath() string

SelfPath returns the absolute path of the current executable file

func (Enter) WriteBytes

func (f Enter) WriteBytes(filePath string, data []byte) (int, error)

WriteBytes writes bytes to a file

func (Enter) WriteString

func (f Enter) WriteString(filePath string, data string) (int, error)

WriteString writes string to a file

Jump to

Keyboard shortcuts

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