fs

package
v3.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT, Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListDir

func ListDir(path string, itemType string) ([]string, error)

ListDir lists all files and directories within a path depending on the itemType provided itemType can be any one of ['file','dir','all']

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile reads file contents within permitted paths

func ReadFileAsString

func ReadFileAsString(path string) (string, error)

ReadFileAsString reads file contents within permitted paths and returns content as string

func ReadFilesFromDir

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

ReadFilesFromDir reads all files from a directory and returns a array with file contents of all files

Types

This section is empty.

Jump to

Keyboard shortcuts

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