## Summary Implement `IFileService` to create the module directory structure and copy/process template files with token replacement. ## Depends On - Phase 3: Token Replacement Service - Phase 2: Template Discovery ## Tasks - [ ] Implement `IFileService` / `FileService`: - `ModuleExists(string solutionDir, string owner, string moduleName)` → bool - `CreateModuleStructure(string targetDir, TemplateManifest manifest, Dictionary<string, string> tokens)` → void - `DeleteModule(string targetDir, string owner, string moduleName)` — for `--force` overwrite - [ ] For each file in the template manifest: 1. Read source template file 2. Apply token replacement to file contents 3. Apply token replacement to target file path 4. Create target directories as needed 5. Write processed file to target location - [ ] Handle `--force` flag: delete existing module directories before creating - [ ] Skip binary files (don't apply token replacement to non-text files) ## Acceptance Criteria - Running `module create` with a real Oqtane template produces the correct file tree: ``` MarkDav.WeatherArbitrage.Client/ MarkDav.WeatherArbitrage.Server/ MarkDav.WeatherArbitrage.Shared/ ``` - All `[Owner]`, `[Module]`, etc. tokens are replaced in file contents - File and directory names have tokens replaced - `--force` removes existing module before recreating - Error when module exists and `--force` is not set ## References - [oqtane-cli-prompt.md — Phase 4: File Creation](specs/oqtane-cli-prompt.md) - [oqtane-module-cli-specification.md — File Operations](specs/oqtane-module-cli-specification.md)
Summary
Implement
IFileServiceto create the module directory structure and copy/process template files with token replacement.Depends On
Tasks
IFileService/FileService:ModuleExists(string solutionDir, string owner, string moduleName)→ boolCreateModuleStructure(string targetDir, TemplateManifest manifest, Dictionary<string, string> tokens)→ voidDeleteModule(string targetDir, string owner, string moduleName)— for--forceoverwrite--forceflag: delete existing module directories before creatingAcceptance Criteria
module createwith a real Oqtane template produces the correct file tree:[Owner],[Module], etc. tokens are replaced in file contents--forceremoves existing module before recreating--forceis not setReferences