2
|
1 package edu.unc.genomics;
|
|
2
|
|
3 import java.nio.file.Files;
|
|
4 import java.nio.file.Path;
|
|
5 import java.nio.file.Paths;
|
|
6
|
|
7 /**
|
|
8 * Find resources based on platform/package
|
|
9 * @author timpalpant
|
|
10 *
|
|
11 */
|
|
12 public class ResourceManager {
|
|
13
|
|
14 private static final Path ASSEMBLIES_DIR = Paths.get("assemblies");
|
|
15 private static final Path IMAGES_DIR = Paths.get("images");
|
|
16
|
|
17 public static Path getResourceDirectory() {
|
|
18 Path osx = Paths.get("../Resources");
|
|
19 if (Files.exists(osx)) {
|
|
20 return osx;
|
|
21 }
|
|
22
|
|
23 return Paths.get("resources");
|
|
24 }
|
|
25
|
|
26 public static Path getAssembliesDirectory() {
|
|
27 return getResourceDirectory().resolve(ASSEMBLIES_DIR);
|
|
28 }
|
|
29
|
|
30 public static Path getImagesDirectory() {
|
|
31 return getResourceDirectory().resolve(IMAGES_DIR);
|
|
32 }
|
|
33 }
|