Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0-rc-3, 2.0.7
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      It would be nice if it were possible to easily create a temporary directory. The Java File class has a method which creates a temporary file but it doesn't just create the File object but also the file on disk. Instead, it might create the object and then the user could decide at that point whether to create a file or directory from the name. The most straight forward approach would be to add a new method called createDir(). The current workaround is to create the file, delete the file, and then make the directory.

        Activity

        Hide
        Paul King added a comment -

        The Groovy codebase itself has numerous implementations of this. Perhaps FileSystemCompiler#createTempDir() looks like the preferred possible candidate implementation for a DGM method.

        Show
        Paul King added a comment - The Groovy codebase itself has numerous implementations of this. Perhaps FileSystemCompiler#createTempDir() looks like the preferred possible candidate implementation for a DGM method.
        Hide
        CÚdric Champeau added a comment -

        Pull request coming, after Hackergarten contribution.

        Show
        CÚdric Champeau added a comment - Pull request coming, after Hackergarten contribution.
        Hide
        Pascal Schumacher added a comment -

        Just wondering:

        Why was the pull request https://github.com/groovy/groovy-core/pull/46/files for this issue closed without being merged into master?

        Show
        Pascal Schumacher added a comment - Just wondering: Why was the pull request https://github.com/groovy/groovy-core/pull/46/files for this issue closed without being merged into master?
        Hide
        CÚdric Champeau added a comment -

        You're right, this is not normal. I'm going to fix it. Well spotted!

        Show
        CÚdric Champeau added a comment - You're right, this is not normal. I'm going to fix it. Well spotted!
        Hide
        Pascal Schumacher added a comment -

        Maybe this can be merged before the final 2.1 release?

        Show
        Pascal Schumacher added a comment - Maybe this can be merged before the final 2.1 release?

          People

          • Assignee:
            CÚdric Champeau
            Reporter:
            Uri Moszkowicz
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: