Build a path, but do not create it
import java.io.File;
import java.io.IOException;
public class Utils {
/**
* Build a path- but do not create it
*
* @param parent
* @param subDirectory
* @return a File representing the path
*/
public static File getDirectoryPath(File parent, String subDirectory) {
File result = null;
if (parent != null) {
result = new File(parent, subDirectory);
}
return result;
}
}
Related examples in the same category