A comprehensive guide to FileFusion's file pattern matching system
- Pattern:
*.go - Matches:
main.gohandlers/utils.gocore/main.go
- Pattern:
*.json,*.yaml - Matches:
config.jsonsettings.yamlnested/data.json
- Pattern:
*.txt - Matches:
logs/errors.txtnested/directory/notes.txt
- Exclusion:
build/** - Matches files in:
src/main.go
- Does not match:
build/output.jsonbuild/logs/errors.log
- Exclusion:
*.log - Matches:
main.goconfig.json
- Does not match:
app.lognested/errors.log
- Exclusion:
logs/*.txt - Matches:
logs/errors.logmain.go
- Does not match:
logs/errors.txt
Exclude hidden directories:
- Exclusion:
**/.hidden/** - Matches:
src/file.go
- Does not match:
.hidden/file.txtnested/.hidden/file.txt
- Exclusion:
build/**,node_modules/** - Matches:
src/main.go
- Does not match:
build/main.onode_modules/lib/index.js
- Exclusion:
README.md - Matches:
main.go
- Does not match:
README.md
- Exclusion:
**/#* - Matches:
main.go
- Does not match:
#tempfile.txt
- Input Pattern:
*.go,*.json- Matches:
main.goconfig.json
- Matches:
- Exclusion:
build/**,test/**- Does not match:
build/main.gotest/utils_test.go
- Does not match:
- Resulting Files:
src/main.gosrc/config.json
- Input Pattern:
**/*.txt - Exclusion:
logs/**- Matches:
docs/readme.txt
- Does not match:
logs/errors.txt
- Matches:
# Include all Go-related files
filefusion -p "*.go,*.mod,*.sum" .
# Include Go files but exclude tests
filefusion -p "*.go" -e "*_test.go" .# Process frontend source files
filefusion -p "*.{js,ts,jsx,tsx,css,scss}" /src
# Include configuration but exclude build artifacts
filefusion -p "*.{js,json,yaml,env}" -e "dist/**,build/**"
# Process only React components
filefusion -p "*.{jsx,tsx}" src/components/# Multiple file types and exclusions
filefusion \
-p "*.go,*.yaml,*.json" \
-e "**/*_test.go,vendor/**,**/testdata/**" \
internal cmd
# will generate 2 output files internal.xml and cmd.xml
# Specific directory patterns with multiple exclusions
filefusion \
-p "*.{js,ts}, *.{json,yaml},*.sh" \
-e "**/*.test.{js,ts},**/__tests__/**,**/node_modules/**"
# Documentation and configuration files
filefusion \
-p "*.md,*.{yaml,yml,json}" \
-e "**/draft/**,**/.git/**,private/**" \
.# Python project
filefusion \
-p "*.{py,ipynb},requirements.txt,setup.py" \
-e "**/__pycache__/**,**/*.pyc,venv/**" \
.
# Java/Kotlin project
filefusion \
-p "*.{java,kt},build.gradle,pom.xml" \
-e "**/build/**,**/target/**,**/*Test.{java,kt}" \
. src
# Full-stack project
filefusion \
-p "*.go,*.{ts,tsx},*.yaml" \
-e "**/node_modules/**,**/dist/**,**/*_test.go" \
. backend frontend/src- Pattern:
***- Error: "invalid pattern: contains invalid glob pattern '***'"
- Valid For Exclusion:
**/file.*,**/*.txt - Invalid:
***/*.txt(returns an error)
Made with ❤️ by the DrGos