Coverage Report - org.mule.util.FilenameUtils
 
Classes in this File Line Coverage Branch Coverage Complexity
FilenameUtils
0%
0/13
0%
0/8
3.5
 
 1  
 /*
 2  
  * $Id: FilenameUtils.java 19191 2010-08-25 21:05:23Z tcarlson $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.util;
 12  
 
 13  
 import java.io.File;
 14  
 
 15  
 public class FilenameUtils extends org.apache.commons.io.FilenameUtils
 16  
 {
 17  
     public static File fileWithPathComponents(String[] pathComponents)
 18  
     {
 19  0
         if (pathComponents == null)
 20  
         {
 21  0
             return null;
 22  
         }
 23  
         
 24  0
         StringBuffer buf = new StringBuffer(64);
 25  0
         for (int i = 0; i < pathComponents.length; i++)
 26  
         {
 27  0
             String component = pathComponents[i];
 28  0
             if (component == null)
 29  
             {
 30  0
                 continue;
 31  
             }
 32  
             
 33  0
             buf.append(component);
 34  0
             if (i < pathComponents.length - 1)
 35  
             {
 36  0
                 buf.append(File.separator);
 37  
             }
 38  
         }
 39  0
         return FileUtils.newFile(buf.toString());
 40  
     }
 41  
     
 42  
     /**
 43  
      * Never create instances of this class.
 44  
      */
 45  
     private FilenameUtils()
 46  
     {
 47  0
         super();
 48  0
     }
 49  
 }
 50  
 
 51