public final class ClassLoaderUtils extends Object
Modifier and Type | Method and Description |
---|---|
static File |
copyResources(ClassLoader classLoader,
String rootPath,
File toDir) |
static File |
copyResources(ClassLoader classLoader,
String rootPath,
File toDir,
com.google.common.base.Function<String,String> relocationFunction) |
static Collection<String> |
listFiles(ClassLoader classLoader,
String rootPath)
Finds files within a given directory and its subdirectories
|
static Collection<String> |
listResources(ClassLoader classLoader,
String rootPath) |
static Collection<String> |
listResources(ClassLoader classLoader,
String rootPath,
com.google.common.base.Predicate<String> predicate)
Finds directories and files within a given directory and its subdirectories.
|
public static File copyResources(ClassLoader classLoader, String rootPath, File toDir)
public static File copyResources(ClassLoader classLoader, String rootPath, File toDir, com.google.common.base.Function<String,String> relocationFunction)
public static Collection<String> listFiles(ClassLoader classLoader, String rootPath)
classLoader
- rootPath
- the root directory, for example org/sonar/sqalepublic static Collection<String> listResources(ClassLoader classLoader, String rootPath)
public static Collection<String> listResources(ClassLoader classLoader, String rootPath, com.google.common.base.Predicate<String> predicate)
classLoader
- rootPath
- the root directory, for example org/sonar/sqale, or a file in this root directory, for example org/sonar/sqale/index.txt
- Copyright © 2009-2012 SonarSource. All Rights Reserved.