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

          Gary Gregory made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          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 ]
          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