Skip to content

Added -p/--parents flag to mkdir command.#464

Open
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue463-20260531084352
Open

Added -p/--parents flag to mkdir command.#464
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue463-20260531084352

Conversation

@opencode-agent
Copy link
Copy Markdown

Completed. Here's a summary of all changes:

Changes made

  1. cli/src/commands/org/jnode/command/file/MkdirCommand.java — Added FlagArgument argParents for -p/--parents. Removed Argument.NONEXISTENT from directory arg (now checked manually). When -p is set, uses File.mkdirs() for recursive parent creation; otherwise uses original File.mkdir() with existence check.

  2. cli/descriptors/org.jnode.command.file.xml — Changed mkdir syntax from simple <argument> to <sequence> with <optionSet> containing <option argLabel="parents" shortName="p" longName="parents"/>.

  3. cli/src/test/org/jnode/test/command/file/mkdir-command-tests.xml (new) — Tests: single directory, nested with -p, nested with --parents, existing dir with -p (succeeds), nested without -p (fails).

  4. cli/src/test/org/jnode/test/command/file/all-file-tests.xml — Added include for mkdir-command-tests.xml.

Build verified: BUILD SUCCESSFUL.

Closes #463

New%20session%20-%202026-05-31T08%3A43%3A51.964Z
opencode session  |  github run

Co-authored-by: LSantha <LSantha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Add mkdir -p support for recursive directory creation

0 participants