Save command should create missing parent directories

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: None
    • Component/s: tools
    • None

      When a <file> argument of a `/save` command in a JShell session starts with a list of directory names, of which at least one does not exist, the command fails with an error reading:
      ```
          /save some/path/Snippet.java
          | File 'some/path/Snippet.java' for '/save' threw exception: java.nio.file.NoSuchFileException: some\path\Snippet.java
      ```
      The save command handling should be enhanced to create such missing parent directories.

      jshell> /help save
      |
      | /save
      | =====
      |
      | Save the specified snippets and/or commands to the specified file.
      |
      | /save <file>
      | Save the source of current active snippets to the file.
      [...]

            Assignee:
            Christian Stein
            Reporter:
            Christian Stein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: