Package biz.aQute.bnd.reporter.helpers
Class FileHelper
- java.lang.Object
-
- biz.aQute.bnd.reporter.helpers.FileHelper
-
public class FileHelper extends java.lang.Object
SomeFile
utility functions.
-
-
Constructor Summary
Constructors Constructor Description FileHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getExtension(java.io.File file)
static java.lang.String
getName(java.io.File file)
static java.io.File
searchSiblingWithDifferentExtension(java.io.File file, java.lang.String[] availableExtensions)
-
-
-
Method Detail
-
getName
public static java.lang.String getName(java.io.File file)
- Parameters:
file
- the file we want its name, may benull
- Returns:
- the name of the file in arguments without its extension, never
null
-
getExtension
public static java.lang.String getExtension(java.io.File file)
- Parameters:
file
- the file we want its extension, may benull
- Returns:
- the extension of the file in arguments, never
null
-
searchSiblingWithDifferentExtension
public static java.io.File searchSiblingWithDifferentExtension(java.io.File file, java.lang.String[] availableExtensions)
- Parameters:
file
- the file for which we are looking for a specific sibling file, may benull
availableExtensions
- anarray
of possible extensions, may benull
- Returns:
- a file which is in the same folder as the file in argument and has the same name but with a different extension and that its extension (of the returned file) is in the availableExtensions array (case insensitive), or null if not found.
-
-