file

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(path string) (bool, error)

func ListDir

func ListDir(dirPath string) (files []string, err error)

ListDir scans the given path without recurse, results to a list of file abs paths

func ReadBytes

func ReadBytes(path string) []byte

ReadBytes reads the whole file and returns the content bytearray.

func ReadLines

func ReadLines(path string) (lines []string)

ReadLines returns the text content by lines

func ReadString

func ReadString(path string) string

ReadString reads the whole file and returns the text content.

func Walk

func Walk(base string) (files []string, err error)

Walk scans the given path with recurse, results to a file list in absolute-path

Types

This section is empty.

Jump to

Keyboard shortcuts

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