Documentation
¶
Index ¶
- func ExpandIfFilePattern(pattern string, recursive bool) ([]string, error)
- func ExpandInputFiles(files []string, recursive bool) ([]string, error)
- func FileExists(path string) bool
- func GenTempFileFromStdin() (string, error)
- func GetAllFilesInFolder(folderPath string, recursive bool) ([]string, error)
- func IgnoreFile(path string, extensions []string) bool
- func IsDir(path string) bool
- func IsEmptyDir(name string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandIfFilePattern ¶
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 ¶
ExpandInputFiles returns all the filenames that match the input filename, filepath or patterns.
func FileExists ¶
func GenTempFileFromStdin ¶ added in v0.10.0
func GetAllFilesInFolder ¶
func IgnoreFile ¶
func IsEmptyDir ¶ added in v0.9.2
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.