1 package com.atlassian.plugins.codegen.util;
2
3 import java.io.File;
4
5 public class FileUtil
6 {
7 /**
8 * Constructs an absolute file reference using a base directory and a dot-delimited identifier,
9 * where all but the last component of the identifier are used as subdirectory names. For instance,
10 * "com.foo.bar" with a file extension of ".properties" will become "parentDir/com/foo/bar.properties".
11 */
12 public static File dotDelimitedFilePath(File parentDir, String identifier, String extension)
13 {
14 return new File(parentDir, identifier.replace(".", File.separator) + extension);
15 }
16 }