fs

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandIfFilePattern

func ExpandIfFilePattern(pattern string, recursive bool) ([]string, error)

ExpandIfFilePattern returns all the filenames that match the input pattern or the filename if it is a specific filename and not a pattern. If the input is a pattern and it yields no result it will result in an error.

func ExpandInputFiles

func ExpandInputFiles(files []string, recursive bool) ([]string, error)

ExpandInputFiles returns all the filenames that match the input filename, filepath or patterns.

func FileExists

func FileExists(path string) bool

func GenTempFileFromStdin added in v0.10.0

func GenTempFileFromStdin() (string, error)

func GetAllFilesInFolder

func GetAllFilesInFolder(folderPath string, recursive bool) ([]string, error)

func IgnoreFile

func IgnoreFile(path string, extensions []string) bool

func IsDir

func IsDir(path string) bool

func IsEmptyDir added in v0.9.2

func IsEmptyDir(name string) (bool, error)

IsEmptyDir checks if a directory is empty. It takes a string parameter `name` representing the directory path. It returns a boolean value indicating whether the directory is empty or not, and an error if any occurred during the process.

Parameters: - name: The path of the directory to check.

Returns: - bool: True if the directory is empty, false otherwise. - error: An error if the directory cannot be read.

Example usage: empty, err := IsEmptyDir("/path/to/directory")

Types

This section is empty.

Jump to

Keyboard shortcuts

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