fsutil

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package fsutil provides file system utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFiles

func AppendFiles(files []string, path, ext string, recursive bool) ([]string, error)

AppendFiles appends files with the specified extension to the given slice. It searches for files in the specified path and optionally in subdirectories.

Parameters:

  • files: A slice of strings to which the found file paths will be appended.
  • path: The directory path to search for files.
  • ext: The file extension to match (including the dot, e.g., ".txt").
  • recursive: If true, search subdirectories recursively.

Returns:

  • A slice of strings containing the original files plus the newly found files.
  • An error if any occurred during the file system operations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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