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

          Hide
          Gary Gregory added a comment -

          Closing, we released version 2.1.

          Show
          Gary Gregory added a comment - Closing, we released version 2.1.
          Show
          Niall Pemberton added a comment - Fixed thanks http://svn.apache.org/viewvc?view=revision&revision=1081025

            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