|
|
1 год назад | |
|---|---|---|
| .. | ||
| Commands | 1 год назад | |
| Properties | 1 год назад | |
| Program.cs | 1 год назад | |
| QfuCommandContext.cs | 1 год назад | |
| QfuEngineContext.cs | 1 год назад | |
| directory_structure.txt | 1 год назад | |
| gen_dirstruct.cmd | 1 год назад | |
| gen_srcout.cmd | 1 год назад | |
| qfu.csproj | 1 год назад | |
| qfu.ico | 1 год назад | |
| qfu.sln | 1 год назад | |
| readme.md | 1 год назад | |
| releasenotes.md | 1 год назад | |
A command-line utility for filesystem operations and file manipulations built on .NET 9.0.
QFU is a powerful filesystem utility that provides efficient file operations through a modular command-based architecture. The tool is designed for developers and system administrators who need reliable file manipulation capabilities with robust error handling and flexible input options.
The application follows a clean modular architecture:
clone)System.IO.Abstractions for testable file operationsgit clone <repository-url>
cd qfu
dotnet build --configuration Release
dotnet publish --configuration Release --self-contained
qfu <command> [arguments] [options]
Clone a source file to one or more destination files.
Syntax:
qfu clone <source_file> <target_files> [options]
Arguments:
source_file: Path to the source file to clonetarget_files: Pipe-separated list of target file paths (file1.txt|file2.txt|file3.txt)Options:
-pe or -path_ensure: Create destination directories if they don't exist-force: Overwrite existing destination files-list: Treat the first target file as a text file containing a list of destination paths (one per line)# Clone a file to multiple destinations
qfu clone source.txt "backup1.txt|backup2.txt|backup3.txt"
# Clone and create destination directories if needed
qfu clone template.config "configs/dev.config|configs/staging.config|configs/prod.config" -pe
# Overwrite existing destination files
qfu clone master.template "project1/config.xml|project2/config.xml" -force -pe
# Create a file list first
echo "backup/file1.txt" > targets.txt
echo "backup/file2.txt" >> targets.txt
echo "backup/file3.txt" >> targets.txt
# Use the list file for cloning
qfu clone source.txt targets.txt -list -pe
# Clone with all options
qfu clone template.cs "src/Class1.cs|src/Class2.cs|tests/TestClass.cs" -force -pe
0: Success - all operations completed successfullyNon-zero: Failure - check console output for specific error detailsQFU provides detailed progress information:
Example output:
Will be cloning file 'source.txt' to 3 files (with force)...
[1] Cloned 'source.txt' to 'dest1.txt' successfully.
[2] File 'dest2.txt' already exists. Skipping clone operation.
[3] Cloned 'source.txt' to 'dest3.txt' successfully.
Successfully cloned: 2 of 3 files.
QFU provides comprehensive error handling:
--force used)-list optionqfu/
├── Commands/
│ ├── BaseCmd.cs # Base command functionality
│ ├── CloneCmd.cs # Clone command implementation
│ └── Aspects/
│ ├── FilesAspect.cs # File handling logic
│ ├── ForceAspect.cs # Force operation logic
│ ├── ListAspect.cs # List file processing
│ └── SourceAspect.cs # Source file validation
├── QfuCommandContext.cs # Command execution context
├── QfuEngineContext.cs # Engine context
└── Program.cs # Application entry point
BaseCmd[CommandDefinition] attributeThe project uses System.IO.Abstractions for testable file operations. Mock the IFileSystem interface for unit testing.
Copyright © 2025 Quadarax
For issues and feature requests, please visit: https://quadarax.com/qfu
Version: 1.0.0
Target Framework: .NET 9.0
Package Tags: FILE, UTILITY