Microsoft.Filesystem.File/Content - Froce tor create path if don't exist
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the Microsoft.Filesystem.File/Content resource and reproduce the YAML configuration using a nested, nonexistent Windows path such as C:\dsc\config\file-content\New\TestFile.txt. Read the resource behavior around file creation and the reported “path specified” error, then verify that the selected force behavior creates the directories and file successfully.
索引モデルが issue の本文から書いたものです。
説明
Summary of the new feature / enhancement
Hi team,
Is a possibility to create whole folder path and structure when file shoudl be located in dedicated folder, smililar like in PowerShell with --force swith when we create New-Item, I see scenarios whe this will be reguired before servers or application be install or created
Example of config
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Test File
type: Microsoft.Filesystem.File/Content
properties:
_exist: true # This will work as force
path: C:\dsc\config\file-content\New\TestFile.txt
content: "This is a test file."
or option B
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Test File
type: Microsoft.Filesystem.File/Content
properties:
force: true # Creation file and path
path: C:\dsc\config\file-content\New\TestFile.txt
content: "This is a test file."
Proposed technical implementation details (optional)
Now when I try to create file in path that don't exist as Subfolder I got error"
ontent' using 'filecontent'
2026-09-20T18:58:38.517129Z DEBUG dsc_lib::dscresources::command_resource: 912: Process 'filecontent' id 6008 exited with code 0
2026-09-20T18:58:38.537890Z DEBUG dsc_lib::dscresources::command_resource: 196: Verifying output of get on 'Microsoft.Filesystem.File/Content' using 'filecontent'
2026-09-20T18:58:38.538332Z DEBUG dsc_lib::dscresources::command_resource: 586: Retrieved schema for resource 'Microsoft.Filesystem.File/Content' with version '0.1.0' from cache
2026-09-20T18:58:38.618624Z ERROR dsc_lib::dscresources::command_resource: 1313: PID 9064: Failed to write file 'C:\dsc\config\file-content\New\TestFile.txt': The system cannot find the path specified. (os error 3)
2026-09-20T18:58:38.619190Z DEBUG dsc_lib::dscresources::command_resource: 912: Process 'filecontent' id 9064 exited with code 3
2026-09-20T18:58:38.619546Z ERROR dsc_lib::dscresources::command_resource: 970: Failed to run process 'filecontent': Command: Resource 'filecontent' [exit code 3] manifest description: File operation error
2026-09-20T18:58:38.620590Z ERROR dsc::subcommand: 108: Error: Command: Resource 'filecontent' [exit code 3] manifest description: File operation error
PS C:\dsc\config\file-content>
- 主要言語
- Rust
- スター
- 526
- フォーク
- 76
- 平均マージ
- 4日 20時間
- マージ済み PR(30日)
- 24
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PowerShell/DSC のほかの issue
-
Issue-Enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
PowerShell/DSC#1729 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Feature Request: Support dsc functions in executable args対応中かも @SteveL-MSFT が 3 日前に担当しました。 オープンIssue-Enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
PowerShell/DSC#1722 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Dev-UX Needs Triage
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
PowerShell/DSC#1694 ·
メンテナーはふだん 1 日以内に返信
-
Issue-Enhancement Needs Triage
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
PowerShell/DSC#1683 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
Issue-Enhancement Needs Triage
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
PowerShell/DSC#1673 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
linebender/parley#849 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
boxlite-ai/boxlite#1729 ·
メンテナーはふだん 1 日以内に返信
-
external
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
langchain-ai/docs#6255 ·
メンテナーはふだん 1 日以内に返信
-
P2 testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信