in core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java [447:466]
public File getDataFile(final String path) {
if (path == null) {
throw new IllegalArgumentException("Invalid path: " + path);
}
synchronized (this) {
if (dataFileBaseDir == null) {
try {
dataFileBaseDir = Files.createTempDirectory("osgi-mock").toFile();
} catch (IOException ex) {
throw new RuntimeException("Error creating temp. directory.", ex);
}
}
}
if (path.isEmpty()) {
return dataFileBaseDir;
}
else {
return new File(dataFileBaseDir, path);
}
}