fsutil

package module
v0.0.0-...-4e754c9 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

README

fsutil

fs utils in golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllSubfolders

func AllSubfolders(dir string) ([]string, error)

AllSubfolders gets all subfolders under given dir. Hidden folders are ignored.

func Exists

func Exists(path string) bool

Exists reports whether the given path exists.

func IsDir

func IsDir(path string) bool

IsDir checks whether the given path is a directory.

func IsFile

func IsFile(path string) bool

IsFile checks whether the given path is a regular file

func IsHiddenFile

func IsHiddenFile(f os.FileInfo) bool

IsHiddenFile checks whether the file is hidden, that's, starts with ".".

func IsSymlink(path string) bool

IsSymlink checks whether the given path is a regular file

func ProcessLine

func ProcessLine(r io.Reader, handler func(line string) bool) error

ProcessLine reads the lines from reader and apply each line to handler. If handler returns false, stop consuming remaining lines. NOTE: Max allowed line size is 2M bytes. https://devmarkpro.com/working-big-files-golang

Types

This section is empty.

Jump to

Keyboard shortcuts

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