Added license and copyright notice.
[instantlauncher.git] / src / main / java / eu / svjatoslav / instantlauncher / configuration / Configuration.java
1 /*
2  * Instantlauncher. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of version 3 of the GNU Lesser General Public License
6  * or later as published by the Free Software Foundation.
7  */
8
9 package eu.svjatoslav.instantlauncher.configuration;
10
11 import java.io.File;
12 import java.util.Set;
13
14 public class Configuration {
15     public Set<FileAssociation> fileAssociations;
16     public String navigationRootPath;
17     public String directoryOpenCommand;
18     public String directoryTerminalOpenCommand;
19
20     public FileAssociation findFileAssociation(File file) {
21         for (FileAssociation association : fileAssociations)
22             if (association.matchesFile(file)) return association;
23
24         return null;
25     }
26
27     public File getNavigationRootDirectory() {
28         return new File(navigationRootPath);
29     }
30
31 }