Commons IO
  1. Commons IO
  2. IO-261

Add FileUtils.getFile API with varargs parameter

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: None
    • Labels:

      Description

      Why not have those in FileUtils?

      public static File getFile(final String... dirs) {
      File ret = null;
      for (String dir : dirs) {
      if (ret == null)

      { ret = new File(dir); }

      else

      { ret = new File(ret.getPath(), dir); }

      }
      return ret;
      }

      public static File getFile(final File dir, final String... dirs) {
      File ret = dir;
      for (String dir1 : dirs) {
      if (ret == null)

      { ret = new File(dir1); }

      else

      { ret = new File(ret.getPath(), dir1); }

      }
      return ret;
      }

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          31d 8h 43m 1 Niall Pemberton 13/Mar/11 00:46
          Resolved Resolved Closed Closed
          211d 15h 1m 1 Gary Gregory 10/Oct/11 16:48
          Gary Gregory made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Gary Gregory added a comment -

          Closing, we released version 2.1.

          Show
          Gary Gregory added a comment - Closing, we released version 2.1.
          Gary Gregory made changes -
          Summary getFile with varargs parameter Add FileUtils.getFile API with varargs parameter
          Gabriele Kahlout made changes -
          Link This issue is related to IO-268 [ IO-268 ]
          Niall Pemberton made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Niall Pemberton [ niallp ]
          Fix Version/s 2.1 [ 12316027 ]
          Resolution Fixed [ 1 ]
          Show
          Niall Pemberton added a comment - Fixed thanks http://svn.apache.org/viewvc?view=revision&revision=1081025
          Mark Thomas made changes -
          Field Original Value New Value
          Workflow jira [ 12545037 ] Default workflow, editable Closed status [ 12601713 ]
          Gabriele Kahlout created issue -

            People

            • Assignee:
              Niall Pemberton
              Reporter:
              Gabriele Kahlout
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development